[pbs-devel] [PATCH proxmox-backup] fix #4646: Set BackupReader debug to current loglevel

Wolfgang Bumiller w.bumiller at proxmox.com
Thu Aug 17 14:42:10 CEST 2023


On Fri, Aug 11, 2023 at 02:53:17PM +0200, Gabriel Goller wrote:
> On a second note, how about we also introduce more fine-grained logging
> settings to the api/proxy?
> Currently on the api we hardcode the `log::max_level` to `LevelFilter::Info`
> and on the proxy we check
> if the environment variable `PROXMOX_DEBUG` is set and use
> `LevelFilter::Debug` if it exists. We could
> do the same as on the cli and allow `PROXMOX_DEBUG` (probably renaming it to
> `PROXMOX_LOG_LEVEL`
> or something) to be set to `trace`, `debug`, `info`, `warning` or `error`.
> Then we could also decide if we want to use the server `log::max_level` or
> the client-side `debug` flag in
> the `download_file` and `download_chunk` functions (where the original issue
> #4646 comes from).

A while ago we Hannes added `init_cli_logger` to proxmox-router which
the CLI binaries call with the `$PBS_LOG` env var.
Having the same mechanism for the daemons' log levels would probably
make sense. We should probably also call it PBS_LOG then.
People could probably temporarily change it via `systemctl
set-environment` or more permanently via an `Environment=` systemd
service snippet file.





More information about the pbs-devel mailing list