question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

logger.debug is sent to stderr

See original GitHub issue

Having added some debug and silly log prints, I was surprised to see my debug logs (using standard console transport) go to stderr, while all other log levels (except error, of course) go to stdout.

Is this intentional? I can’t find any documentation about debug being sent to stderr by default?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
indexzerocommented, Jun 1, 2018

Fixed in #1332. Will be released in 3.0.0 next Tuesday.

3reactions
indexzerocommented, Apr 22, 2018

That’s fair – but I think the capability mismatch more subtle. Based on the scenarios winston shines in it boils down to the difference between a “console” (i.e. stdout in a production process) and a terminal (i.e. a TTY enabled terminal).

In a terminal it is useful to separate these streams, but in a console (as you mentioned) it is not. Perhaps shipping two Transports is the answer or simply flipping the defaults and then documenting how to get terminal like behavior from a single Console transport.

Since we’re still in RC this is a valid breaking change for 3.0.0 – strongly considering it based on the ~40 or so 👍across the various duplicate issues.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python logging: debug messages logged to stderr even ...
While modifying code on an existing project, I found that debug messages were being output to stderr even though the handler ...
Read more >
Python stdin stderr logging - Deepu Mohan Puthrote
Most shells will show you stdout and stderr logs in the console. You can redirect error logs and stdout logs into different files....
Read more >
Logger - loguru documentation - Read the Docs
loguru.logger. class Logger [source] . An object to dispatch logging messages to configured handlers. The Logger is the core object of loguru...
Read more >
Python Logging Basics - The Ultimate Guide To Logging
NOTSET and DEBUG messages will not be included here. ... applications can just send log messages to stdout or stderr and have systemd...
Read more >
Python Logging Tutorial - DevDungeon
import logging # Configure global logger to output DEBUG and higher ... basicConfig(handlers=handlers) logging.error('This goes to stderr, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found