Skip to content

Syslog logging #10352

@grawity

Description

@grawity

Feature description

The new logging framework doesn't seem to integrate with system logging at all. It only logs to stdout, which means it prefixes its own timestamps (even though the system already does that to all received log messages), and it doesn't have a way to fill in message priority (meaning that all messages – from debug to fatal error – become just 'info').

Would it be acceptable to add support to output log messages through Unix syslog() (e.g. --log-target=syslog, which currently I didn't find in syncthing serve --help)?

Problem or use case

Support for standard logging API would make it easier to read logs by 1) avoiding duplicate fields, and 2) allowing e.g. journalctl to highlight important messages in more obvious ways than just the 'WRN' field.

The latter would also allow existing "alert server owner on warning/error log messages" to function with Syncthing, without having to special-case syncthing's own log format.

Alternatives or workarounds

None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew features or improvements of some kind, as opposed to a problem (bug)needs-triageNew issues needed to be validated

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions