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

Debug Level Not Showing Up #73

Closed
vpetreski opened this issue Feb 9, 2018 · 1 comment
Closed

Debug Level Not Showing Up #73

vpetreski opened this issue Feb 9, 2018 · 1 comment

Comments

@vpetreski
Copy link

vpetreski commented Feb 9, 2018

Hi, I tried many things but DEBUG level is not shown for some reason. My configuration:

//Logger.useDefaults();
Logger.useDefaults({
    defaultLevel: Logger.DEBUG,
    formatter: function (messages, context) {
        messages.unshift(new Date().toUTCString())
    }
});

Logger.setLevel(Logger.DEBUG);

// Only log WARN and ERROR messages.
//Logger.setLevel(Logger.WARN);
//Logger.debug("Donut machine is out of pink ones");  // Not a peep.
//Logger.warn("Asteroid detected!");  // Logs "Asteroid detected!", best do something about that!

// Ah, you know what, I'm sick of all these messages.
// But I want to see them again later
//var oldLevel = Logger.getLevel();
//Logger.setLevel(Logger.OFF);
//Logger.error("Hull breach on decks 5 through to 41!");  // ...

// Actually, maybe those logs were quite useful...
//Logger.setLevel(oldLevel);

Logger.debug("I'm a debug message!");
Logger.info("OMG! Check this window out!", window);
Logger.warn("Purple Alert! Purple Alert!");
Logger.error("HOLY SHI... no carrier.");

Logger.debug("XXXXXXXX");
Logger.debug("YYYYYYYY");

// Start timing something
Logger.time('self destruct sequence');

// ... Some time passes ...

// Stop timing something.
Logger.timeEnd('self destruct sequence'); // logs: 'self destruct sequence: XXXms'.
@jonnyreeves
Copy link
Owner

I'm guessing this is a dupe of #61; if so I would very much appreciate a PR against the README which warns other users about this issue.

Thanks!

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