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 via email to