From: Thomas Ellmenreich <t.ellmenreich@proxmox.com>
To: pbs-devel@lists.proxmox.com
Cc: Thomas Ellmenreich <t.ellmenreich@proxmox.com>
Subject: [RFC proxmox-backup 0/2] backup log: reduce logging during backup
Date: Wed, 23 Sep 2026 12:27:57 +0200 [thread overview]
Message-ID: <20260923102759.139819-1-t.ellmenreich@proxmox.com> (raw)
There are a few different forum posts discussing the excessive default logging
of the proxmox-backup-client and its server counterpart: [0], [1]. A lot of the
heavy lifting has been done by Gabriel Goller as mentioned here [0] this just
addresses the final client side setting.
The final implementation just uses proxmox_log::enabled! to determine the log
settings and set the debug flag accordingly. By doing so, in all normal cases,
where INFO is the default verbosity level the following logs should NOT be
displayed anymore:
- 'download chunk "...' [0]
- 'GET /chunk' [0]
- 'successfully added chunk' [1]
Originally, I was planning on implementing this in a way more complex way, but
then ended up choosing this one for now. The current method is used in a few
other places around the codebase and this series would definitely work
perfectly as is.
That said, I have considered two other options:
Proper Implementation
---------------------
The current implementation sets the debug flag on the client, which then passes
it to the server. The server then has a mechanism, separate from tracing, to
decide if to issue 'debug' or 'info' logs.
My initial idea was to replace the existing debug flag on all API endpoints
with an EnvFilter [3] string, which would then be used to change the local
filtering behaviour to match the one on the client. [*]
Aside from the question if we really want the client to control server logging
(also in the current impl), this implementation would be quite complex and
would require a version of this series: [2] to be applied first.
[*]: This would be done by layering a scoped subscriber over the global one. The
new subscriber would only affect logs in the current function while the
guard has not been dropped.
Deleting the serverside
-----------------------
To be quite frank, I find that deleting this functionality altogether might be
the best option. A person that would look at the logs on serverside also has
the access to change the serverside loglevel. Additionally, the aforementioned
Series [3] would then allow very fine grained control of the log settings.
As a note, with the current setup, one can set the server side log level to
TRACE, but if the client doesn't enable the debug flag, none of these logs will
be printed. So by deleting the flag, the custom log filtering mechanism on
serverside can also be deleted.
[0]: https://forum.proxmox.com/threads/how-to-stop-syncjob-flooting-syslog.118894/#post-546081
[1]: https://forum.proxmox.com/threads/enhancement-suggestion-log-levels.130080/
[2]: https://lore.proxmox.com/pdm-devel/20260921095210.229315-2-t.ellmenreich@proxmox.com/T/#t
[3]: https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html
proxmox-backup:
Thomas Ellmenreich (2):
backup writer: add constructor for BackupWriterOptions
fix #4646: backup writer: base debug flag on log level
examples/upload-speed.rs | 15 +++++++--------
pbs-client/src/backup_writer.rs | 21 +++++++++++++++++++++
proxmox-backup-client/src/benchmark.rs | 15 +++++++--------
proxmox-backup-client/src/main.rs | 15 +++++++--------
src/server/push.rs | 17 ++++++++---------
5 files changed, 50 insertions(+), 33 deletions(-)
Summary over all repositories:
5 files changed, 50 insertions(+), 33 deletions(-)
--
Generated by murpp 0.12.0
next reply other threads:[~2026-09-23 10:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 10:27 Thomas Ellmenreich [this message]
2026-09-23 10:27 ` [PATCH proxmox-backup 1/2] backup writer: add constructor for BackupWriterOptions Thomas Ellmenreich
2026-09-23 10:27 ` [PATCH proxmox-backup 2/2] fix #4646: backup writer: base debug flag on log level Thomas Ellmenreich
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=20260923102759.139819-1-t.ellmenreich@proxmox.com \
--to=t.ellmenreich@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.