To see the SQL generated by Node Sequelize.js,. we set the logging
option.
For instance, we write
const sequelize = new Sequelize("database", "username", "password", {
logging: console.log,
});
to set the logging
property to log with console.log
.
We can also write
const sequelize = new Sequelize("database", "username", "password", {
logging: (str) => {
// do your own logging
},
});
to log with our own logging function.