[pbs-devel] [PATCH proxmox-backup] log: update to tracing in proxmox-daily-update
Gabriel Goller
g.goller at proxmox.com
Mon Dec 9 11:47:57 CET 2024
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/pbs-3-3-0-dly-update-status-unknown.158764/
Reported-by: Fiona Ebner <f.ebner at proxmox.com>
Signed-off-by: Gabriel Goller <g.goller at proxmox.com>
---
Note: this patch relies on
https://lore.proxmox.com/pbs-devel/20241209104606.263045-1-g.goller@proxmox.com/T/#m0b852d2987004eaa42715e445efec0aba98aeafe
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 dbfee07b4cd4..8e9cd8035cb3 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 at pam")));
--
2.39.5
More information about the pbs-devel
mailing list