Debug does not output query
While running in the repl with debug: true on the adapter, I do not get the query output like I would for an RDBMS adapter.
I need to console the query which is executing on models which included many relations. Please help me if possible.
What version of the loopback-connector-mongodb are you using?
There is debug available here: https://github.com/strongloop/loopback-connector-mongodb/blob/master/lib/mongodb.js#L284
Is this not sufficient? Can you please provide an example of query and more information on this please? Thanks
You can turn on the debug by setting the DEBUG environment variable.
DEBUG=loopback:connector:mongodb
@wojohowitz , with the answer above, is this issue good to close?
For security reasons we do not log the query output rather just log the query itself. The query output may contain confidential information for the user and it is recommended to not debug log the query output.
Closing this issue as it is resolved. Feel free to reopen if needed.
If sb can see the log of an app they already pass through every security so it doesn't make sense if you prevent displaying sql query in order to not having security issue. It's necessary for me as a developer to see my log. please add this feature to loopback and if you have a strong reason for security it's better just warn the developer in document.