Skip to content

Conversation

mintbridge
Copy link
Contributor

Add the ability to pass an array of packet types to debug, that restricts the debug output to those types. It can be quiet noisy if all your after is the query that was run.

If the debug param is an array check that the packet type is in it
@dresende
Copy link
Collaborator

Your change to Protocol.js should be much easier using Array.isArray :)

@mintbridge
Copy link
Contributor Author

Haha,updated. I was in browser JS mode :)

@dresende
Copy link
Collaborator

Another thing, sorry to bug you with it, but why do you .join() ? .indexOf should just work fine in the Array.

@mintbridge
Copy link
Contributor Author

Its no problem. I've removed it

@dresende
Copy link
Collaborator

LGTM. @felixge ?

@dresende
Copy link
Collaborator

I'm merging it, it's simple and handy in many debugging situations.

dresende added a commit that referenced this pull request Mar 13, 2013
Ability to restrict debugging to certain types
@dresende dresende merged commit 483dfa8 into mysqljs:master Mar 13, 2013
@felixge
Copy link
Collaborator

felixge commented Mar 21, 2013

@dresende yeah, good call on merging this! Sorry, just working through my email backlog again now!

@mintbridge thank you so much for this patch! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants