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

Gabriel Goller g.goller at proxmox.com
Mon Aug 21 13:20:34 CEST 2023

Submitted a patch with the proposed change.

On 8/17/23 14:42, Wolfgang Bumiller wrote:
> 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
>> 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