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 <g.goller@proxmox.com>
This commit is contained in:
Gabriel Goller 2024-12-09 11:47:57 +01:00 committed by Thomas Lamprecht
parent c9cd520a1a
commit c6600acf0b

View File

@ -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")));