Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

Support for journald logging #359

Open
peterhoeg opened this issue Sep 6, 2021 · 0 comments
Open

Support for journald logging #359

peterhoeg opened this issue Sep 6, 2021 · 0 comments

Comments

@peterhoeg
Copy link

Is your feature request related to a problem? Please describe.

The default logger logs superflous info when logging to journald (of systemd fame):

Sep 06 12:04:53 day go-neb[2212178]: time="2021-09-06T12:04:53+08:00" level=info msg="Inserted 1 clients"

Describe the solution you'd like

journald handles both the level and timestamp, so all we really need is:

Sep 06 12:04:53 day go-neb[2212178]: msg="Inserted 1 clients"

It's possible to detect if you're running under systemd (and thus logging to journald) by checking for the environment variable INVOCATION_ID.

Describe alternatives you've considered

An alternative is to do proper logging of structured data to journald when
detected which would be nice (and which would also solve all of this), but just
getting rid of the duplicate information would be an excellent first step.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant