public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Gabriel Goller <g.goller@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup] log: update to tracing in proxmox-daily-update
Date: Mon,  9 Dec 2024 11:47:57 +0100	[thread overview]
Message-ID: <20241209104757.267291-1-g.goller@proxmox.com> (raw)

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


             reply	other threads:[~2024-12-09 10:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-09 10:47 Gabriel Goller [this message]
2024-12-09 12:08 ` Fiona Ebner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241209104757.267291-1-g.goller@proxmox.com \
    --to=g.goller@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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