Skip to content
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

logger.debug('...') calls don't work when level is set to logger.DEBUG #61

Closed
pavle-goloskokovic opened this issue Sep 18, 2017 · 4 comments

Comments

@pavle-goloskokovic
Copy link

pavle-goloskokovic commented Sep 18, 2017

logger.debug('...') calls are NOT printed when level is set to logger.DEBUG when using v1.4.1.
logger.info('...') and above are printed.
With v1.3.0 it works fine.

This is the basic functionality of a logger, if this doesn't work than it's pretty much useless :P

For the project where I'm using it I'm writing my code in TypeScript and compiling it with latest version of webpack, it might be relevant.
Will be using v1.3.0 until this issue is resolved.

Thanks!

@jonnyreeves
Copy link
Owner

Hi, sorry to see you are experiencing problems.

I think this might be an environmental issue as this test case looks like it covers your repro case above?

To help debug this further could you let me know which browser you are using?

Thanks

@pavle-goloskokovic
Copy link
Author

I'm using Chrome Version 61.0.3163.91 (Official Build) (64-bit) (latest version at the time of writing).
The test code looks correct, could you try running it in Chrome?

But nevertheless I doubt it is an environmental issue since the v1.3.0 works as expected and v1.4.1 has this issue.
My guess is that changes that were made for the later version are cause of it.

@jonnyreeves
Copy link
Owner

jonnyreeves commented Sep 19, 2017

Ah ok, I think I know what the problem might be. v1.4 of js-logger introduced a change which rows l routed DEBUG level messages through to console.debug() when that method is present.

Is it possible that your console log filter setting in Chrome Developer Tools is filtering these messages out?

Apologies if this is not the case but I'm currently without access to an environment where I can recreate this issue.

@pavle-goloskokovic
Copy link
Author

@jonnyreeves that was it.
By default Chrome only shows INFO messages and above, it has to be explicitly selected to show DEBUG and browser specific messages from a dropdown menu:

image

I guess this is how it is supposed to work form now on.
Thanks for helping out!

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

No branches or pull requests

2 participants