Debug log written to stderr
See original GitHub issueTest case:
var logger = require('winston');
logger.remove(logger.transports.Console);
logger.add(logger.transports.Console, {'timestamp': true, 'showLevel': false, 'level': 'debug'});
logger.info('info');
logger.debug('debug');
logger.error('error');
Output:
$ node test-winston.js 2>/dev/stdout 1>/dev/null
2015-02-22T11:37:59.072Z - debug: debug
2015-02-22T11:37:59.203Z - error: error
$ node test-winston.js 1>/dev/stdout 2>/dev/null
2015-02-22T11:40:56.820Z - info: info
Expected result (disregarding the timestamp copy/paste) would be:
$ node test-winston.js 2>/dev/stdout 1>/dev/null
2015-02-22T11:37:59.203Z - error: error
$ node test-winston.js 1>/dev/stdout 2>/dev/null
2015-02-22T11:40:56.820Z - info: info
2015-02-22T11:37:59.072Z - debug: debug
Winston version: 0.9.0, Node.js version: 0.10.18.
Issue Analytics
- State:
- Created 9 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Debug logs are written in stderr · Issue #3566 - GitHub
Summary The logs for debug are written in stderr instead of stdout. Dagit UI/UX Issue Screenshots Message from the maintainers: Impacted by ...
Read more >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 >Focused `puts` debugging with STDERR | Ruby Inside - Medium
I'm a big fan of puts debugging when I'm trying to reproduce a particularly tricky bug, or I want to quickly get a...
Read more >How to enable logging - The Chromium Projects
--enable-logging=stderr enables both logging to stderr and using OutputDebugStringA on Windows. Note that the sandbox prevents either form of this logging from ...
Read more >How we use logging - Tit Petric
7 (DEBUG) - Kernel debugging messages, output by the kernel if the ... Handler } // HandleLog splits log outputs to stdout and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
why is it a feature to spam my error logs with debug logs?
This behaviour is also very confusing on Cloud Foundry based platforms (e.g. IBM Bluemix). The standard debug log messages are all classified as errors 😦
Took me a while to find https://github.com/winstonjs/winston/issues/927 … which explains that it can be configured via the
stderrLevels
parameter (which I’ve now done). Still a bit unexpected, that the default behavior is for INFO level messages to route tostdout