Skip to content

Write all log messages to stderr#1852

Open
jennings wants to merge 2 commits into
belav:mainfrom
jennings:log-to-stderr
Open

Write all log messages to stderr#1852
jennings wants to merge 2 commits into
belav:mainfrom
jennings:log-to-stderr

Conversation

@jennings
Copy link
Copy Markdown
Contributor

Description

Diagnostic output is often expected to go to standard error, leaving standard output for program output (which is the formatted file when using --write-stdout or reading from stdin).

Changes ConsoleLogger to write all log messages to stderr, and updates all tests to match.

Related Issue

Related to #1851, but isn't the complete fix (that issue needs the exit code changed)

Checklist

  • My code follows the project's code style
    • always var
    • follow existing naming conventions
    • always this.
    • no pointless comments
  • I will not force push after a code review of my PR has started
  • I have added tests that cover my changes

Diagnostic output is usually expected to go to standard error, leaving
standard output for program output (which is the formatted file when
using `--write-stdout` or reading from stdin).

Changes ConsoleLogger to write all log messages to stderr, and updates
all tests to match.
@jennings
Copy link
Copy Markdown
Contributor Author

It occurs to me that me that many people expect well-behaved daemons to log to stdout. Perhaps logs should go to stderr when running as a program but to stdout when running as a server?

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

Successfully merging this pull request may close these issues.

1 participant