Skip to content

Fix stderr logging for journald and syslog#33832

Merged
cpuguy83 merged 1 commit intomoby:masterfrom
glasser:glasser/msg-source
Jun 27, 2017
Merged

Fix stderr logging for journald and syslog#33832
cpuguy83 merged 1 commit intomoby:masterfrom
glasser:glasser/msg-source

Conversation

@glasser
Copy link
Copy Markdown
Contributor

@glasser glasser commented Jun 26, 2017

logger.PutMessage, added in #28762 (v17.04.0-ce), clears msg.Source. So journald
and syslog were treating stderr messages as if they were stdout.

Signed-off-by: David Glasser [email protected]

Fixes #33834

logger.PutMessage, added in moby#28762 (v17.04.0-ce), clears msg.Source. So journald
and syslog were treating stderr messages as if they were stdout.

Signed-off-by: David Glasser <[email protected]>
Copy link
Copy Markdown
Member

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Copy link
Copy Markdown
Contributor

@LK4D4 LK4D4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cpuguy83
Copy link
Copy Markdown
Member

Well, CI is being funky from issues with GH yesterday, and it doesn't really test logging drivers anyway.
Merging since this looks good.

@76creates
Copy link
Copy Markdown

76creates commented Mar 23, 2023

msg.Source always resolves to stdout, even if you do something like >&2 echo "error" inside a container, no mater what you do it its never stderr, any ideas? @glasser

@cpuguy83
Copy link
Copy Markdown
Member

Best to open a new issue or discussion, but maybe check if you have TTY enabled.
TTY only has one stream.

@76creates
Copy link
Copy Markdown

Made sure to have -t
Details here > #45202
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

syslog driver combines stderr and stdout

5 participants