To log all queries use:
DEBUG='sequelize:sql:*' npm run dev
Shortcut:
npm run devs
However, you often want to long only a few selected queries, otherwise it becomes very difficult to determine which query is which, in partciular due asynchronous execution. In this case, use the technique mentioned at: stackoverflow.com/questions/21427501/how-can-i-see-the-sql-generated-by-sequelize-js/21431627#21431627 and just add:
logging: console.log
to the code in the query you want to log.

Ancestors