We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
systemd_journal_logger::init_with_extra_fields() allows adding extra fields to every log message.
systemd_journal_logger::init_with_extra_fields()
But is there a way to add extra fields to just individual log messages?
Perhaps something like: info!("Hello systemd journal"; "FOO" => "BAR");
info!("Hello systemd journal"; "FOO" => "BAR");
The text was updated successfully, but these errors were encountered:
The logger writes structured log data to the journal. That's an unstable feature if the log crate, see the log crate's GitHub for details.
I don't know whether there's syntax support in the log macros already.
For more info please refer to the log crate for more information.
Sorry, something went wrong.
ah, thanks for the pointer. I've found rust-lang/log#343 which tracks adding key/value pairs to the log crate macros.
No branches or pull requests
systemd_journal_logger::init_with_extra_fields()
allows adding extra fields to every log message.But is there a way to add extra fields to just individual log messages?
Perhaps something like:
info!("Hello systemd journal"; "FOO" => "BAR");
The text was updated successfully, but these errors were encountered: