Skip to content
This repository was archived by the owner on Jan 26, 2023. It is now read-only.

Syslog support #104

Merged
merged 7 commits into from
May 27, 2022
Merged

Syslog support #104

merged 7 commits into from
May 27, 2022

Conversation

fmorency
Copy link
Contributor

@fmorency fmorency commented May 27, 2022

Make use of the tracing-syslog repo at https://github.com/max-heller/tracing-syslog

See tokio-rs/tracing#1137 for the whole story.

I tested this using syslog-ng. When the syslog service is not running, messages are still written to the log files and get picked up when the service restarts.

Fixes #101

@hansl this crate is not on crates.io and this PR uses the git repo directly, fixed to a rev. I don't know the author's intention moving forward but we might want to fork this until/if it gets integrated into the tokio tracing ecosystem. WDYT?

Also, this feature is currently not optional. Do you want me to add a --syslog flag to the binaries?

fmorency added 2 commits May 27, 2022 11:06

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Use the `tracing-syslog` crate and log to both stdout and syslog
@fmorency fmorency added the enhancement New feature or request label May 27, 2022
@fmorency fmorency requested a review from hansl May 27, 2022 15:21
@fmorency fmorency self-assigned this May 27, 2022
@hansl
Copy link
Contributor

hansl commented May 27, 2022

Make the flag --logmode=syslog that way we can have multiple different modes (like json, term).

@hansl
Copy link
Contributor

hansl commented May 27, 2022

Let's reach out to @max-heller to see if he'd need a home for that crate (we could have it in liftedinit) or if he's planning to maintain it and publish it soon. It seems simple enough.

Copy link
Contributor

@hansl hansl left a comment

Choose a reason for hiding this comment

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

LGTM with the change from stdout to stderr

@fmorency fmorency merged commit 3746bc9 into liftedinit:main May 27, 2022
@fmorency fmorency deleted the fmorency/enh-101-syslog branch May 27, 2022 19:32
@max-heller
Copy link

Let's reach out to @max-heller to see if he'd need a home for that crate (we could have it in liftedinit) or if he's planning to maintain it and publish it soon. It seems simple enough.

Published as syslog-tracing, I was trying to get ownership of the name-squat tracing-syslog but couldn't get in contact with the owner.

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

Successfully merging this pull request may close these issues.

Add syslog capabilities
3 participants