Is there a way to display only SQL queries on the console when debug mode is on? I want to reduce the amount of information that is displayed.
Thanks for the help;)
Actually, if you use MySQL, you can install
debug: ['ComQueryPacket']
as part of the configuration settings for mysql (not Knex).
I will consider this as an option in Knex.
Set the environment variables to configure the module debug:
debug
DEBUG=knex:query
DEBUG=knex:tx
DEBUG=knex*
, , , "", Knex .
:
var knex = require( 'knex' ); knex.on( 'query', function( queryData ) { console.log( queryData ); });
, queryData json .