-
-
Notifications
You must be signed in to change notification settings - Fork 157
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
log.debug should map to console debug in Chrome #137
Comments
I second this. Chrome currently displays debug logs in blue text under the "verbose" category. loglevel is mapping |
Yeah, this has been divisive, I'm still not 100% sure either way. The original discussion is here: #64. The main problem is that this log level doesn't appear in the console by default, which confuses users, as they expect loglevel alone to control which levels of output are visible. Most users don't even realise that chrome's level filtering exists at all. I'll keep thinking about it - if you or anybody else has strong feelings, do reply here! In the meantime, you can work around this yourself. If you'd prefer the direct mapping behaviour, you can bring it back using the code snippet from #126 (comment) |
Hi @pimterry, Thanks for the lovely plugin! I personally think that people shouldn't be confused by a direct mapping to That being said, I can understand why people would want this library to compensate for that, I just don't think it should. I don't know, I think it's a bit weird that JFYI my use-case for this library is that I'm using it for Node.js on Lambda, which means that when I use log.debug, instead of seeing DEBUG, I see INFO on CloudWatch's logs. Nonetheless, would it be possible to add #126 to the docs while this is still up in the air, or perhaps add a toggle switch? I fairly think it's useful for people who ONLY wants to have a lightweight mechanism to control whether or not their |
I suggest to create a new method called "useConsoleDebug(value: boolean)" or "useChromeSpecification(value: boolean)" or another name in order to reorder (remap) the internal calls to the console methods using the Chrome specification. |
This is still open and I still don't see why you do such an exception for |
With I think it makes a lot more sense to teach users with an important note in the docs about log level filters, rather than completely omitting a standard console method. |
Although the documentation for Chrome console specifies that console.debug has a log level of "info", it actually has log level of "verbose".
With the current loglevel implementation, debug messages are mapped to console.info. This behavior doesn't allow filtering messages in the dev console which are actually "verbose", and hence causing console.debug and log.debug to have different behaviors.
I suggest that log.debug would map to console debug.
The text was updated successfully, but these errors were encountered: