[pbs-devel] [PATCH-SERIES] replace print by log macro in libraries

Hannes Laimer h.laimer at proxmox.com
Fri Mar 11 16:07:45 CET 2022


This series mostly replaces print with the log macro in libs, it also replaces print
in binaries where it is used to log stuff and not output the result of a command.
In the process of replacing prints by log macros a few parameters controlling verbosity
became obsolete and were removed, other 'verbose' parameters influenced the control
flow and where therefore kept.

The whole changes were split up into 7 seperate patches[3-9], this was done
to aviod one huge patch file and improve readability. Those (maybe also 2) 
should be squashed when applied since they are not necesarilly buildable. 
The reason for that is that in a few places 'verbose' parameters were remove.

A verion bump is also needed since patches 2 (and indirectly 3-10) depend on 
the function added to proxmox-router in patch 1.


proxmox:

Hannes Laimer (1):
  router: add init_cli_logger helper function

 proxmox-router/Cargo.toml     |  1 +
 proxmox-router/src/cli/mod.rs | 11 +++++++++++
 2 files changed, 12 insertions(+)


proxmox-backup:

Hannes Laimer (2):
  libs: replace print with log macro
  docs: add note for setting verbosity level

 docs/command-syntax.rst                       |  4 +
 examples/upload-speed.rs                      |  2 +-
 pbs-client/Cargo.toml                         |  1 +
 pbs-client/src/backup_writer.rs               | 93 +++++++-----------
 pbs-client/src/catalog_shell.rs               |  4 +-
 pbs-client/src/http_client.rs                 | 14 +--
 pbs-client/src/pxar/create.rs                 |  2 -
 pbs-client/src/pxar/extract.rs                | 44 +++------
 pbs-client/src/pxar/fuse.rs                   | 18 ++--
 pbs-client/src/pxar/metadata.rs               |  4 +-
 pbs-client/src/pxar_backup_stream.rs          |  6 +-
 pbs-client/src/task_log.rs                    |  8 +-
 pbs-client/src/tools/key_source.rs            |  2 +-
 pbs-datastore/src/catalog.rs                  |  6 +-
 pbs-datastore/src/datastore.rs                |  4 +-
 pbs-datastore/src/dynamic_index.rs            |  2 +-
 pbs-datastore/src/fixed_index.rs              | 14 +--
 pbs-datastore/src/paperkey.rs                 |  2 +-
 pbs-fuse-loop/Cargo.toml                      |  1 +
 pbs-fuse-loop/src/fuse_loop.rs                | 12 +--
 pbs-tape/Cargo.toml                           |  1 +
 pbs-tape/src/bin/pmt.rs                       | 11 ++-
 pbs-tape/src/bin/pmtx.rs                      |  9 +-
 pbs-tape/src/sg_pt_changer.rs                 |  4 +-
 proxmox-backup-client/Cargo.toml              |  1 +
 proxmox-backup-client/src/benchmark.rs        | 31 +++---
 proxmox-backup-client/src/catalog.rs          |  6 +-
 proxmox-backup-client/src/key.rs              | 27 +++---
 proxmox-backup-client/src/main.rs             | 96 ++++++++-----------
 proxmox-backup-client/src/mount.rs            | 12 +--
 proxmox-file-restore/Cargo.toml               |  1 +
 proxmox-file-restore/src/block_driver_qemu.rs |  6 +-
 proxmox-file-restore/src/main.rs              | 23 ++---
 proxmox-file-restore/src/qemu_helper.rs       | 18 ++--
 proxmox-rest-server/src/api_config.rs         |  4 +-
 proxmox-rest-server/src/command_socket.rs     | 10 +-
 proxmox-rest-server/src/file_logger.rs        |  2 +-
 .../src/proxmox_restore_daemon/api.rs         |  1 -
 pxar-bin/Cargo.toml                           |  1 +
 pxar-bin/src/main.rs                          | 50 ++--------
 src/api2/admin/datastore.rs                   |  2 +-
 src/bin/proxmox-backup-debug.rs               |  4 +-
 src/bin/proxmox-backup-manager.rs             |  1 +
 src/bin/proxmox-tape.rs                       |  1 +
 src/bin/sg-tape-cmd.rs                        | 11 ++-
 45 files changed, 238 insertions(+), 338 deletions(-)
-- 
2.30.2






More information about the pbs-devel mailing list