SQL query logging for debugging

If you are using Strapi v4 you can do:

module.exports = ({ env }) => ({
  connection: {
    client: 'sqlite',
    connection: {
      filename: path.join(__dirname, '..', env('DATABASE_FILENAME', '.tmp/data.db')),
    },
    useNullAsDefault: true,
    debug:true
  },
});

in your ./config/database.js
if it does not seem to work, perhaps is not in the right place. It should bein the outer object beneath the useNullAsDefault