Skip to content

better support for logging to syslog #357

@djugei

Description

@djugei

this is kinda like #349 but bigger.

Have two format strings, the regular one is configured just as it currently is, and a second one that could be configured via .format_syslog in the builder.

The syslog formatter by default skips timestamps and such as those will be provided by the syslog.

env_logger then auto-detects if its running as a daemon, with an override available.
The most common service manager is systemd.
Detecting being run as systemd daemon is as simple as checking for the INVOCATION_ID environment variable.
Other service managers may require more complex detection.

I am willing to contribute the code, in fact i am working on it already, and will send a pr later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions