From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 9F0A170C14 for ; Wed, 15 Jun 2022 10:20:10 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 96F9827473 for ; Wed, 15 Jun 2022 10:20:10 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id B37C22743A for ; Wed, 15 Jun 2022 10:20:08 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 8C1BD43B62 for ; Wed, 15 Jun 2022 10:20:08 +0200 (CEST) From: Hannes Laimer To: pbs-devel@lists.proxmox.com Date: Wed, 15 Jun 2022 08:19:46 +0000 Message-Id: <20220615081957.33511-1-h.laimer@proxmox.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.040 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox-backup-manager.rs, proxmox-tape.rs, sg-tape-cmd.rs, datastore.rs, mod.rs, catalog.rs, fuse.rs, create.rs, benchmark.rs, main.rs, pmtx.rs, key.rs, extract.rs, proxmox-backup-debug.rs, metadata.rs, upload-speed.rs, mount.rs, api.rs, pmt.rs, paperkey.rs] Subject: [pbs-devel] [PATCH-SERIES proxmox-backup/proxmox v3 00/10] replace print by log macro in libraries X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2022 08:20:10 -0000 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 : * 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