public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Hannes Laimer <h.laimer@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH-SERIES proxmox-backup/proxmox v3 00/10] replace print by log macro in libraries
Date: Wed, 15 Jun 2022 08:19:46 +0000	[thread overview]
Message-ID: <20220615081957.33511-1-h.laimer@proxmox.com> (raw)

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(outputs that were behind an if(verbose).. are now log::debug),
other 'verbose' parameters influenced the control flow and where therefore kept.

The whole changes were split up into 7 seperate patches[2-8], this was done
to aviod one huge patch file and improve readability. Those (maybe also 1) 
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 1 (and indirectly 2-8) depend on 
the function added to proxmox-router.

v3, thanks @Wolfgang Bumiller <w.bumiller@proxmox.com>:
 * updated verbosity in some places
 * used log_enabled!(...)
 * removed unused 'print_info' function
 * rebased onto master

* 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 (10):
  bins: init cli logger
  pbs-client: replace print with log macro
  pbs-datastore: replace print with log macro
  pbs-fuse+pbs-tape: replace print with log macro
  proxmox-backup-client: replace print with log macro
  proxmox-file-restore: replace print with log macro
  proxmox-rest-server: replace print with log macro
  replace print with log macro
  docs: add note for setting verbosity level
  fixed_index: remove unused 'print_info' function

 docs/command-syntax.rst                       |   4 +
 examples/upload-speed.rs                      |   2 +-
 pbs-client/Cargo.toml                         |   1 +
 pbs-client/src/backup_writer.rs               | 103 ++++++++----------
 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                |  70 ++++--------
 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                |   2 +-
 pbs-datastore/src/dynamic_index.rs            |   2 +-
 pbs-datastore/src/fixed_index.rs              |  19 +---
 pbs-datastore/src/paperkey.rs                 |   2 +-
 pbs-fuse-loop/Cargo.toml                      |   3 +-
 pbs-fuse-loop/src/fuse_loop.rs                |  12 +-
 pbs-tape/Cargo.toml                           |   1 +
 pbs-tape/src/bin/pmt.rs                       |  12 +-
 pbs-tape/src/bin/pmtx.rs                      |  10 +-
 pbs-tape/src/sg_pt_changer.rs                 |   4 +-
 proxmox-backup-client/Cargo.toml              |   1 +
 proxmox-backup-client/src/benchmark.rs        |  36 ++----
 proxmox-backup-client/src/catalog.rs          |   6 +-
 proxmox-backup-client/src/key.rs              |  27 +++--
 proxmox-backup-client/src/main.rs             |  92 +++++++---------
 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              |  26 ++---
 proxmox-file-restore/src/qemu_helper.rs       |  18 ++-
 proxmox-rest-server/src/api_config.rs         |   4 +-
 proxmox-rest-server/src/command_socket.rs     |  13 ++-
 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                          |  51 +++------
 src/api2/admin/datastore.rs                   |   6 +-
 src/bin/proxmox-backup-debug.rs               |   4 +-
 src/bin/proxmox-backup-manager.rs             |   2 +
 src/bin/proxmox-tape.rs                       |   2 +
 src/bin/sg-tape-cmd.rs                        |  12 +-
 45 files changed, 259 insertions(+), 375 deletions(-)

-- 
2.30.2





             reply	other threads:[~2022-06-15  8:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-15  8:19 Hannes Laimer [this message]
2022-06-15  8:19 ` [pbs-devel] [PATCH proxmox v3 1/1] router: add init_cli_logger helper function Hannes Laimer
2022-06-21  8:40   ` [pbs-devel] applied: " Wolfgang Bumiller
2022-06-15  8:19 ` [pbs-devel] [PATCH proxmox-backup v3 01/10] bins: init cli logger Hannes Laimer
2022-06-15  8:19 ` [pbs-devel] [PATCH proxmox-backup v3 02/10] pbs-client: replace print with log macro Hannes Laimer
2022-06-15  8:19 ` [pbs-devel] [PATCH proxmox-backup v3 03/10] pbs-datastore: " Hannes Laimer
2022-06-15  8:19 ` [pbs-devel] [PATCH proxmox-backup v3 04/10] pbs-fuse+pbs-tape: " Hannes Laimer
2022-06-15  8:19 ` [pbs-devel] [PATCH proxmox-backup v3 05/10] proxmox-backup-client: " Hannes Laimer
2022-06-15  8:19 ` [pbs-devel] [PATCH proxmox-backup v3 06/10] proxmox-file-restore: " Hannes Laimer
2022-06-15  8:19 ` [pbs-devel] [PATCH proxmox-backup v3 07/10] proxmox-rest-server: " Hannes Laimer
2022-06-15  8:19 ` [pbs-devel] [PATCH proxmox-backup v3 08/10] " Hannes Laimer
2022-06-15  8:19 ` [pbs-devel] [PATCH proxmox-backup v3 09/10] docs: add note for setting verbosity level Hannes Laimer
2022-06-15  8:19 ` [pbs-devel] [PATCH proxmox-backup v3 10/10] fixed_index: remove unused 'print_info' function Hannes Laimer
2022-06-21  8:46 ` [pbs-devel] applied-series: [PATCH-SERIES proxmox-backup/proxmox v3 00/10] replace print by log macro in libraries Wolfgang Bumiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220615081957.33511-1-h.laimer@proxmox.com \
    --to=h.laimer@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal