-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use console.debug() instead of console.log() where available (e.g. browsers) #600
Comments
@picwellwisher12pk that has absolutely nothing to do with this ticket. Please open a new one. |
I doubt this will ever happen. The if you want to extend you're console or logger then that is the entire purpose of this library. https://github.com/nmccready/preacher You're asking this library to do too much. Keep it the way it is unixy. |
@nmccready I don't see how your response is relevant at all. We're already using Since I'm not getting much intelligible feedback on this, I don't see any objections and I think it's an improvement to better match how the behavior works in the console. |
10-4, sorry I thought you were asking to override console.debug with debug itself. Instead your asking for the implementation of debug to use console.debug and not console.log for its output. Apologies |
|
@targos TIL. Yeah I figured the logic would be |
Actually, the node version uses stdout. If people want to use |
also removes a branch for each logging call, slightly improving performance in the browser.
also removes a branch for each logging call, slightly improving performance in the browser.
also removes a branch for each logging call, slightly improving performance in the browser.
also removes a branch for each logging call, slightly improving performance in the browser.
Just a heads-up about this code change: by default the Chromium web console (maybe others too) filters messages at the |
Seeing as how that's kind of how terminal applications work currently, this is fine. I was aware of this behavior when making the change, hence why it's marked for the 5.x release. |
Frankly speaking, it's not a good idea. When I upgraded the package from 4.1.1 to 4.2.0, I couldn't find my debug logs until I switched to the 'user messages' category. It's not user friendly, although that chould be Chrome's problem. |
@PieerePi That is definitely chrome's problem, not ours. This library isn't built for only chrome. Locking this as I don't think there's much more discussion to be had here. |
Currently
debug
output in the browser getsconsole.log()
'd.However, browsers have a
console.debug()
call (nonexistent in Node.js, of course) that would group alldebug
output into its own category, perhaps making it easier for debugging in the browser when trying to look at regular application output.Relevant lines:
https://github.com/visionmedia/debug/blob/master/src/browser.js#L112-L114
Thoughts?
The text was updated successfully, but these errors were encountered: