diff --git a/crates/radicle-node/src/main.rs b/crates/radicle-node/src/main.rs index 799bd99b..9c9c68c8 100644 --- a/crates/radicle-node/src/main.rs +++ b/crates/radicle-node/src/main.rs @@ -338,7 +338,8 @@ fn initialize_logging(options: &LogOptions) -> Result<(), Box("radicle-node".to_string(), []).map_err(Box::new)? + const SYSLOG_IDENTIFIER: &str = "radicle-node"; + logger::<&str, &str, _>(SYSLOG_IDENTIFIER.to_string(), []).map_err(Box::new)? } Logger::Radicle => Box::new(radicle::logger::Logger::new(level)), } diff --git a/crates/radicle-systemd/src/journal.rs b/crates/radicle-systemd/src/journal.rs index ffea4105..4d53df52 100644 --- a/crates/radicle-systemd/src/journal.rs +++ b/crates/radicle-systemd/src/journal.rs @@ -1,11 +1,8 @@ -use systemd_journal_logger::{connected_to_journal, current_exe_identifier, JournalLog}; +use systemd_journal_logger::{connected_to_journal, JournalLog}; /// If the current process is directly connected to the systemd journal, /// return a logger that will write to it. -pub fn logger( - default_identifier: String, - extra_fields: I, -) -> std::io::Result> +pub fn logger(identifier: String, extra_fields: I) -> std::io::Result> where I: IntoIterator, K: AsRef, @@ -13,7 +10,7 @@ where { Ok(Box::new( JournalLog::new()? - .with_syslog_identifier(current_exe_identifier().unwrap_or(default_identifier)) + .with_syslog_identifier(identifier) .with_extra_fields(extra_fields), )) }