From c6600acf0b6aae222e58388e41be0ba497e36f19 Mon Sep 17 00:00:00 2001 From: Gabriel Goller Date: Mon, 9 Dec 2024 11:47:57 +0100 Subject: [PATCH] log: update to tracing in proxmox-daily-update Previously we just wrote to syslog directly. This doesn't work anymore since the tracing update and we won't get any output in the tasklog. Reported-by: https://forum.proxmox.com/threads/158764/ Signed-off-by: Gabriel Goller --- src/bin/proxmox-daily-update.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/bin/proxmox-daily-update.rs b/src/bin/proxmox-daily-update.rs index dbfee07b..8e9cd803 100644 --- a/src/bin/proxmox-daily-update.rs +++ b/src/bin/proxmox-daily-update.rs @@ -109,14 +109,7 @@ async fn run(rpcenv: &mut dyn RpcEnvironment) -> Result<(), Error> { fn main() { proxmox_backup::tools::setup_safe_path_env(); - - if let Err(err) = syslog::init( - syslog::Facility::LOG_DAEMON, - log::LevelFilter::Info, - Some("proxmox-daily-update"), - ) { - eprintln!("unable to initialize syslog - {err}"); - } + proxmox_log::init::journald_and_tasklog("PBS_LOG", proxmox_log::LevelFilter::INFO).expect("Failed to setup proxmox_log logger"); let mut rpcenv = CliEnvironment::new(); rpcenv.set_auth_id(Some(String::from("root@pam")));