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

journal: provide a way to distinguish between stdout and stderr streams #6599

Closed
wants to merge 3 commits into from

Commits on Feb 4, 2018

  1. journald: start versioning the stdout stream protocol

    The existing protocol is considered as version=0. A version can be sent
    as part of the header, as a numeric (integer) line right after the
    stream identifier. If it isn't a number, we fall back to version=0 and
    treat the second line as the unit id string, keeping backwards
    compatibility.
    
    For versions > 0, ignore all unknown fields at the bottom (end) of the
    header, until a special STDOUT_STREAM_HEADER_MARKER line is seen, so in
    the future new lines (fields) can be added to the protocol in a
    backwards compatible way (allowing forwards compatibility from now on).
    fabiokung committed Feb 4, 2018
    Configuration menu
    Copy the full SHA
    b7cda26 View commit details
    Browse the repository at this point in the history
  2. journal: add a new _STDIO_STREAM field to stdout streams

    Bump the stdout header protocol to v1, so a new "name" field can be
    (optionally) configured per stream. This is used to differentiate stdout
    and stderr streams from units (StandardOutput vs StandardError in unit
    config).
    
    Log entries from units using StandardOutput=journal[+console] and
    StandardError=journal[+console] will have a new _STDIO_STREAM=stdout|stderr
    field on their log entries in the journal.
    fabiokung committed Feb 4, 2018
    Configuration menu
    Copy the full SHA
    074f952 View commit details
    Browse the repository at this point in the history
  3. journal: change sd_journal_stream_fd to the header protocol v1

    Allowing it to configure a different _STDIO_STREAM field (stdout or stderr)
    in the future when so desired.
    fabiokung committed Feb 4, 2018
    Configuration menu
    Copy the full SHA
    70c235b View commit details
    Browse the repository at this point in the history