[pbs-devel] applied: [PATCH v2] add tracing init_cli_logger and deprecate old one
Gabriel Goller
g.goller at proxmox.com
Tue Sep 3 14:27:24 CEST 2024
On 03.09.2024 14:21, Wolfgang Bumiller wrote:
>On Tue, Sep 03, 2024 at 02:10:51PM GMT, Gabriel Goller wrote:
>> Christian Ebner and I just noticed that previously all the output was on
>> stderr, because the `env_logger` prints everything to stderr
>> per-default [0]. This means that all the console output from
>> proxmox-backup-client, -manager, -debug, -file-restore, pxar, etc. is
>> now on stdout.
>>
>> There is one test failing in pxar-bin, but I have a patch ready for that
>> already.
>>
>> But will this cause more problems down the road? Do we rely somwhere on the
>> stderr output? Should I change the tracing output to stderr as well?
>>
>> [0]: https://docs.rs/env_logger/latest/env_logger/
>
>Yeah having logs go to stderr would make sense.
>CLI tool output that is meant to be "useful" for *tooling* should be
>printed with `println!()` after all, not "logged".
Ok, will send a patch soon!
Currently we nearly always log in our cli-tools, but maybe we should
start using println?
More information about the pbs-devel
mailing list