I'm new to Loopback. I have used Sequelize ORM in the past, and I'm used to seeing Sequelize output the SQL statements to the Console. How can I do the same with Loopback 4? I've done extensive searching on the web, and I found a place where they suggested to add debug: true
to the datasource config json file. However, this change had no effect.
Any help is greatly appreciated.
Hello from the LoopBack team 👋
We use debug module to deal with debug logging and most connectors print SQL statements in their debug log.
You can enable debug logs by setting the environment variable DEBUG
. For example, on a Unix system (Unix, MacOS), you can run the following command:
DEBUG=loopback:connector* npm start
On Windows, you have to set the variable in a standalone command.
set DEBUG=loopback:connector*
npm start
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With