Search code examples
expressbookshelf.jsknex.js

knex.js - debug only SQL


Is there any way to display only SQL queries on console when debugging mode is on? I want to reduce the amount of informations which is displayed.

Thanks for the help ;)


Solution

  • Actually, if you're using MySQL, you can set

    debug: ['ComQueryPacket']
    

    as part of the config settings for mysql (not Knex).

    I'll looking into adding this as an option in Knex though.