[pbs-devel] [PATCH proxmox 1/2] worker_task: always print the result message to the syslog
Gabriel Goller
g.goller at proxmox.com
Wed Sep 3 16:13:45 CEST 2025
When a worker-task ends it prints a result line. This line is written
directly to the tasklog file, because we want to bypass tracing (to
avoid this line getting filtered). Force this line into the syslog as
well by always printing it to stderr, which will end up in syslog. This
means that regardless of the task's result (failure or success) or the
tracing filtering, the last line will always be printed to syslog.
Suggested-by: Friedrich Weber <f.weber at proxmox.com>
Signed-off-by: Gabriel Goller <g.goller at proxmox.com>
---
proxmox-rest-server/src/worker_task.rs | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/proxmox-rest-server/src/worker_task.rs b/proxmox-rest-server/src/worker_task.rs
index a3a65add5ce8..6840938bdb2a 100644
--- a/proxmox-rest-server/src/worker_task.rs
+++ b/proxmox-rest-server/src/worker_task.rs
@@ -1026,9 +1026,7 @@ impl WorkerTask {
match LogContext::current() {
Some(context) => {
context.log_unfiltered(&state.result_text());
- if result.is_err() {
- eprintln!("{}", &state.result_text());
- }
+ eprintln!("{}", &state.result_text());
}
None => error!("error writing task result to the tasklog"),
}
--
2.47.2
More information about the pbs-devel
mailing list