mirror of
https://git.proxmox.com/git/proxmox-perl-rs
synced 2025-11-01 01:38:09 +00:00
log: use new logging builder, print to stderr and journald
Use the new builder. Print the logs to stderr and journald always. Remove the log dependency. Suggested-by: Lukas Wagner <l.wagner@proxmox.com> Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
This commit is contained in:
parent
8b3eda5893
commit
d08df46683
@ -5,7 +5,12 @@ pub fn init(env_var_name: &str, default_log_level: &str) {
|
||||
if let Err(e) = default_log_level
|
||||
.parse()
|
||||
.map_err(Error::from)
|
||||
.and_then(|default_log_level| proxmox_log::init_logger(env_var_name, default_log_level))
|
||||
.and_then(|default_log_level| {
|
||||
proxmox_log::Logger::from_env(env_var_name, default_log_level)
|
||||
.stderr_pve()
|
||||
.journald()
|
||||
.init()
|
||||
})
|
||||
{
|
||||
eprintln!("could not set up env_logger: {e:?}");
|
||||
}
|
||||
|
||||
@ -18,7 +18,6 @@ anyhow = "1.0"
|
||||
hex = "0.4"
|
||||
http = "0.2.7"
|
||||
libc = "0.2"
|
||||
log = "0.4.17"
|
||||
nix = "0.26"
|
||||
openssl = "0.10.40"
|
||||
serde = "1.0"
|
||||
|
||||
@ -29,7 +29,7 @@ mod export {
|
||||
}
|
||||
|
||||
pub fn send_updates_available(_updates: &[&APTUpdateInfo]) -> Result<(), Error> {
|
||||
log::warn!("update notifications are not implemented for PMG yet");
|
||||
tracing::warn!("update notifications are not implemented for PMG yet");
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@ -20,7 +20,6 @@ base64 = "0.13"
|
||||
hex = "0.4"
|
||||
http = "0.2.7"
|
||||
libc = "0.2"
|
||||
log = "0.4.17"
|
||||
nix = "0.26"
|
||||
openssl = "0.10.40"
|
||||
serde = "1.0"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user