You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was implemented in mysqljs/mysql a while back. Here is the PR from 2013: mysqljs/mysql#413
I looked through the code under mysql2/lib and all I could find was only checks for a boolean flag like:
if(this.config.debug){console.log(...
I was hoping to see in debug output all SQL queries that mysql2 sends to the server but setting debug: true prints too much noise like client/server handshakes, raw data packets, etc..
Any suggestions how I can print only the SQL queries in debug output?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
It seems like the ability to restrict debugging to certain packet types is not supported as in
mysqljs/mysql
.From the docs: mysqljs/mysql - Debugging and reporting problems
It's possible in
mysqljs/mysql
to pass an array of packet types (i.e. packet constructor names) using thedebug
option:This was implemented in
mysqljs/mysql
a while back. Here is the PR from 2013: mysqljs/mysql#413I looked through the code under
mysql2/lib
and all I could find was only checks for a boolean flag like:I was hoping to see in debug output all SQL queries that
mysql2
sends to the server but settingdebug: true
prints too much noise like client/server handshakes, raw data packets, etc..Any suggestions how I can print only the SQL queries in debug output?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions