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

tracing-journald: allow custom journal fields #2708

Merged
merged 12 commits into from
Sep 5, 2023
Prev Previous commit
Next Next commit
Beautify docs
Finomnis committed Sep 3, 2023
commit 5d7382cba8cc8abb3929d5879f98d03228907e9d
6 changes: 2 additions & 4 deletions tracing-journald/src/lib.rs
Original file line number Diff line number Diff line change
@@ -154,17 +154,15 @@ impl Subscriber {

/// Adds fields that will get be passed to journald with every log entry.
///
/// This can for example be used to configure the syslog facility.
///
/// The input values of this function are interpreted as `(field, value)` pairs.
///
/// This can for example be used to configure the syslog facility.
/// See [Journal Fields](https://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html)
/// and [journalctl](https://www.freedesktop.org/software/systemd/man/journalctl.html)
/// for more information.
///
/// ```rust
/// use tracing_journald::Subscriber;
///
/// # use tracing_journald::Subscriber;
/// let sub = Subscriber::new()
/// .unwrap()
/// .with_custom_fields([("SYSLOG_FACILITY", "17")]);