From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: Hannes Laimer <h.laimer@proxmox.com>
Cc: pbs-devel@lists.proxmox.com
Subject: Re: [pbs-devel] [PATCH proxmox-backup rebased 8/9] replace print with log macro
Date: Tue, 31 May 2022 10:42:22 +0200 [thread overview]
Message-ID: <20220531084222.p5bkw45vovdareet@casey.proxmox.com> (raw)
In-Reply-To: <20220510090158.33504-10-h.laimer@proxmox.com>
On Tue, May 10, 2022 at 09:01:57AM +0000, Hannes Laimer wrote:
> diff --git a/pxar-bin/src/main.rs b/pxar-bin/src/main.rs
> index bad68f24..e96ea13e 100644
> --- a/pxar-bin/src/main.rs
> +++ b/pxar-bin/src/main.rs
(...)
> @@ -419,24 +397,16 @@ async fn mount_archive(archive: String, mountpoint: String, verbose: bool) -> Re
> archive: {
> description: "Archive name.",
> },
> - verbose: {
> - description: "Verbose output.",
> - optional: true,
> - default: false,
> - },
> },
> },
> )]
> /// List the contents of an archive.
> -fn dump_archive(archive: String, verbose: bool) -> Result<(), Error> {
> +fn dump_archive(archive: String) -> Result<(), Error> {
> for entry in pxar::decoder::Decoder::open(archive)? {
> let entry = entry?;
>
> - if verbose {
> - println!("{}", format_single_line_entry(&entry));
> - } else {
> - println!("{:?}", entry.path());
> - }
> + log::debug!("{}", format_single_line_entry(&entry));
> + log::info!("{:?}", entry.path());
^ here is probably also better to keep the condition with
`log_enabled!(Debug)` rather than having double the lines in debug mode.
> }
> Ok(())
> }
next prev parent reply other threads:[~2022-05-31 8:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-10 9:01 [pbs-devel] [PATCH-SERIES] replace print by log macro in libraries Hannes Laimer
2022-05-10 9:01 ` [pbs-devel] [PATCH proxmox-backup rebased 1/9] bins: init cli logger Hannes Laimer
2022-05-10 9:01 ` [pbs-devel] [PATCH proxmox 1/1] router: add init_cli_logger helper function Hannes Laimer
2022-05-10 9:01 ` [pbs-devel] [PATCH proxmox-backup rebased 2/9] pbs-client: replace print with log macro Hannes Laimer
2022-05-31 8:38 ` Wolfgang Bumiller
2022-05-10 9:01 ` [pbs-devel] [PATCH proxmox-backup rebased 3/9] pbs-datastore: " Hannes Laimer
2022-05-31 8:44 ` Wolfgang Bumiller
2022-05-10 9:01 ` [pbs-devel] [PATCH proxmox-backup rebased 4/9] pbs-fuse+pbs-tape: " Hannes Laimer
2022-05-10 9:01 ` [pbs-devel] [PATCH proxmox-backup rebased 5/9] proxmox-backup-client: " Hannes Laimer
2022-05-10 9:01 ` [pbs-devel] [PATCH proxmox-backup rebased 6/9] proxmox-file-restore: " Hannes Laimer
2022-05-10 9:01 ` [pbs-devel] [PATCH proxmox-backup rebased 7/9] proxmox-rest-server: " Hannes Laimer
2022-05-10 9:01 ` [pbs-devel] [PATCH proxmox-backup rebased 8/9] " Hannes Laimer
2022-05-31 8:42 ` Wolfgang Bumiller [this message]
2022-05-10 9:01 ` [pbs-devel] [PATCH proxmox-backup rebased 9/9] docs: add note for setting verbosity level Hannes Laimer
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=20220531084222.p5bkw45vovdareet@casey.proxmox.com \
--to=w.bumiller@proxmox.com \
--cc=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