* [pbs-devel] [PATCH proxmox-backup] fix #4387: pbs-client: print task-logs to stdout
@ 2022-12-19 11:20 Hannes Laimer
2022-12-20 8:29 ` Wolfgang Bumiller
0 siblings, 1 reply; 2+ messages in thread
From: Hannes Laimer @ 2022-12-19 11:20 UTC (permalink / raw)
To: pbs-devel
... since those logs are the result of the command.
---
pbs-client/src/task_log.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pbs-client/src/task_log.rs b/pbs-client/src/task_log.rs
index a396a451..960653de 100644
--- a/pbs-client/src/task_log.rs
+++ b/pbs-client/src/task_log.rs
@@ -77,9 +77,9 @@ pub async fn display_task_log(
}
if strip_date && t.len() > 27 && &t[25..27] == ": " {
let line = &t[27..];
- log::info!("{}", line);
+ println!("{}", line);
} else {
- log::info!("{}", t);
+ println!("{}", t);
}
start += 1;
}
--
2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [pbs-devel] [PATCH proxmox-backup] fix #4387: pbs-client: print task-logs to stdout
2022-12-19 11:20 [pbs-devel] [PATCH proxmox-backup] fix #4387: pbs-client: print task-logs to stdout Hannes Laimer
@ 2022-12-20 8:29 ` Wolfgang Bumiller
0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Bumiller @ 2022-12-20 8:29 UTC (permalink / raw)
To: Hannes Laimer; +Cc: pbs-devel
Applied this as a quick fix, but I'd actually like to avoid having
output like that in library crates.
This just ended up here as it is shared between pbs and the
client-binary, but a better API when sharing this would be to take a
`mut output: impl Write` and use the `write!()` macro on that.
On Mon, Dec 19, 2022 at 12:20:24PM +0100, Hannes Laimer wrote:
> ... since those logs are the result of the command.
> ---
> pbs-client/src/task_log.rs | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/pbs-client/src/task_log.rs b/pbs-client/src/task_log.rs
> index a396a451..960653de 100644
> --- a/pbs-client/src/task_log.rs
> +++ b/pbs-client/src/task_log.rs
> @@ -77,9 +77,9 @@ pub async fn display_task_log(
> }
> if strip_date && t.len() > 27 && &t[25..27] == ": " {
> let line = &t[27..];
> - log::info!("{}", line);
> + println!("{}", line);
> } else {
> - log::info!("{}", t);
> + println!("{}", t);
> }
> start += 1;
> }
> --
> 2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-12-20 8:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-19 11:20 [pbs-devel] [PATCH proxmox-backup] fix #4387: pbs-client: print task-logs to stdout Hannes Laimer
2022-12-20 8:29 ` Wolfgang Bumiller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox