public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup] log: update to tracing in proxmox-daily-update
@ 2024-12-09 10:47 Gabriel Goller
  2024-12-09 12:08 ` Fiona Ebner
  0 siblings, 1 reply; 2+ messages in thread
From: Gabriel Goller @ 2024-12-09 10:47 UTC (permalink / raw)
  To: pbs-devel

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@proxmox.com>
Signed-off-by: Gabriel Goller <g.goller@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@pam")));
-- 
2.39.5



_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [pbs-devel] [PATCH proxmox-backup] log: update to tracing in proxmox-daily-update
  2024-12-09 10:47 [pbs-devel] [PATCH proxmox-backup] log: update to tracing in proxmox-daily-update Gabriel Goller
@ 2024-12-09 12:08 ` Fiona Ebner
  0 siblings, 0 replies; 2+ messages in thread
From: Fiona Ebner @ 2024-12-09 12:08 UTC (permalink / raw)
  To: Gabriel Goller, pbs-devel

Am 09.12.24 um 11:47 schrieb Gabriel Goller:
> 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/

Note that you can shorten this to
https://forum.proxmox.com/threads/158764/
which is nicer for commit messages.

> Reported-by: Fiona Ebner <f.ebner@proxmox.com>

No need for that tag, I just pointed you to the forum thread :)


_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-12-09 12:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-09 10:47 [pbs-devel] [PATCH proxmox-backup] log: update to tracing in proxmox-daily-update Gabriel Goller
2024-12-09 12:08 ` Fiona Ebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal