public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Gabriel Goller <g.goller@proxmox.com>
To: Lukas Wagner <l.wagner@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] [PATCH proxmox-mail-forward 2/2] switch to proxmox-log
Date: Fri, 6 Dec 2024 11:40:02 +0100	[thread overview]
Message-ID: <ie46gzbi7lsetjnkd5t3hsnpbdiewzopuoolcfv2xu3srt5kpp@vinzhcx56m23> (raw)
In-Reply-To: <20241206101007.156910-2-l.wagner@proxmox.com>

> fn main() {
>-    if let Err(err) = syslog::init(
>-        syslog::Facility::LOG_DAEMON,
>-        log::LevelFilter::Info,
>-        Some("proxmox-mail-forward"),
>-    ) {
>+    if let Err(err) = proxmox_log::init_logger("PROXMOX_LOG", LevelFilter::INFO) {
>         eprintln!("unable to initialize syslog: {err}");
>     }
>

Haven't looked at this crate yet, so I don't know where it's all used,
but IMO the new `init_perlmod_logger` would be better? Because the
`init_logger` function will always print to journald and check if a
pbs task exists (which will never happen here afaiu).
We can also add another simpler subscriber which will only log to
journald (I can also do that, just let me know).

Btw now I release how stupid these function names are, I should rename
them in the future eliding the `perlmod`, `cli` names. Something like
`init_journald_and_tasks` and `init_stderr_and_journald`.


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


  reply	other threads:[~2024-12-06 10:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-06 10:10 [pve-devel] [PATCH proxmox 1/2] notify: smtp: add missing 'tracing' namespace prefix Lukas Wagner
2024-12-06 10:10 ` [pve-devel] [PATCH proxmox-mail-forward 2/2] switch to proxmox-log Lukas Wagner
2024-12-06 10:40   ` Gabriel Goller [this message]
2024-12-06 12:07     ` Lukas Wagner
2024-12-06 10:20 ` [pve-devel] [PATCH proxmox 1/2] notify: smtp: add missing 'tracing' namespace prefix Gabriel Goller

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=ie46gzbi7lsetjnkd5t3hsnpbdiewzopuoolcfv2xu3srt5kpp@vinzhcx56m23 \
    --to=g.goller@proxmox.com \
    --cc=l.wagner@proxmox.com \
    --cc=pve-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