From: Gabriel Goller <g.goller@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox{, -backup} v4 0/4] proxmox-log introduction
Date: Wed, 17 Apr 2024 16:13:14 +0200 [thread overview]
Message-ID: <20240417141323.144861-1-g.goller@proxmox.com> (raw)
Removed the task_log! (and friends task_warn!, task_debug!, etc.) macro
and introduced the `tracing` crate. We now initiate the tracing crate
using a single layer, which is logging to the syslog and the tasklog.
It uses the `syslog` crate and the original `FileLogger`.
To write to the task logs from the worker threads and tasks, we now
have a task_local logger (and warning counter), which
will get instantiated when a task/thread is created. This means that
when we call `info!` or any other `tracing` log macros, it will get
the file_logger from TLS and write to the file.
v4:
- rebase
- reword commit messages (thanks @Thomas)
- split into multiple patches
v3, thanks @Sterzy:
- updated debian/control files
- downgraded tracing-log
v2:
- Rebase onto master
- Split proxmox-backup commit into two
v1, thanks @Wolfgang, @Lukas:
- Combined syslog and tasklog to single layer
- Infer the logging target from the FileLogger TLS
RFC v2, thanks @Dominik, @Thomas:
- Remove the 'tasklog = true' attribute and infer the context
- Wrap the worker_thread or worker_task in a span with name
'worker_task'
- All events in the span with name 'worker_task' get logged to the
file_logger, everything else goes to syslog (Error events go to
both)
- Remove the `Option<>` around the `FileLogger` in TLS
- Clippy fixes
proxmox:
Gabriel Goller (2):
proxmox-log: add tracing infrastructure
enable tracing logger, remove task_log macros
Cargo.toml | 6 +
proxmox-log/Cargo.toml | 23 ++++
proxmox-log/debian/changelog | 5 +
proxmox-log/debian/control | 52 +++++++++
proxmox-log/debian/copyright | 18 +++
proxmox-log/debian/debcargo.toml | 7 ++
.../src/file_logger.rs | 2 +-
proxmox-log/src/lib.rs | 37 ++++++
proxmox-log/src/syslog_tasklog_layer.rs | 106 ++++++++++++++++++
proxmox-rest-server/Cargo.toml | 2 +
proxmox-rest-server/src/api_config.rs | 3 +-
proxmox-rest-server/src/lib.rs | 3 -
proxmox-rest-server/src/rest.rs | 4 +-
proxmox-rest-server/src/worker_task.rs | 104 ++++++++---------
proxmox-sys/src/worker_task_context.rs | 47 --------
15 files changed, 313 insertions(+), 106 deletions(-)
create mode 100644 proxmox-log/Cargo.toml
create mode 100644 proxmox-log/debian/changelog
create mode 100644 proxmox-log/debian/control
create mode 100644 proxmox-log/debian/copyright
create mode 100644 proxmox-log/debian/debcargo.toml
rename {proxmox-rest-server => proxmox-log}/src/file_logger.rs (98%)
create mode 100644 proxmox-log/src/lib.rs
create mode 100644 proxmox-log/src/syslog_tasklog_layer.rs
proxmox-backup:
Gabriel Goller (2):
switch from task_log! macro to tracing
api: switch from task_log! macro to tracing
Cargo.toml | 7 +
debian/control | 2 +
pbs-datastore/Cargo.toml | 1 +
pbs-datastore/src/chunk_store.rs | 30 +---
pbs-datastore/src/datastore.rs | 70 ++++-----
src/api2/admin/datastore.rs | 26 ++--
src/api2/config/acme.rs | 20 +--
src/api2/config/datastore.rs | 16 +-
src/api2/config/prune.rs | 14 +-
src/api2/node/apt.rs | 13 +-
src/api2/node/certificates.rs | 64 ++++----
src/api2/node/disks/directory.rs | 13 +-
src/api2/node/disks/mod.rs | 12 +-
src/api2/node/disks/zfs.rs | 30 ++--
src/api2/node/mod.rs | 11 +-
src/api2/pull.rs | 33 ++--
src/api2/tape/backup.rs | 72 ++++-----
src/api2/tape/drive.rs | 146 +++++++-----------
src/api2/tape/restore.rs | 254 ++++++++++---------------------
src/backup/verify.rs | 103 ++++---------
src/bin/proxmox-backup-api.rs | 10 +-
src/bin/proxmox-backup-proxy.rs | 42 ++---
src/server/gc_job.rs | 6 +-
src/server/prune_job.rs | 26 ++--
src/server/pull.rs | 230 +++++++++-------------------
src/server/realm_sync_job.rs | 40 ++---
src/server/verify_job.rs | 10 +-
src/tape/drive/mod.rs | 34 ++---
src/tape/pool_writer/mod.rs | 88 +++++------
src/tools/disks/mod.rs | 21 +--
tests/worker-task-abort.rs | 9 +-
31 files changed, 515 insertions(+), 938 deletions(-)
Summary over all repositories:
46 files changed, 828 insertions(+), 1044 deletions(-)
--
Generated by git-murpp 0.5.0
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
next reply other threads:[~2024-04-17 14:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-17 14:13 Gabriel Goller [this message]
2024-04-17 14:13 ` [pbs-devel] [PATCH proxmox v4 1/4] proxmox-log: add tracing infrastructure Gabriel Goller
2024-04-17 14:13 ` [pbs-devel] [PATCH proxmox v4 2/4] enable tracing logger, remove task_log macros Gabriel Goller
2024-04-17 14:13 ` [pbs-devel] [PATCH proxmox-backup v4 3/4] switch from task_log! macro to tracing Gabriel Goller
2024-04-17 14:13 ` [pbs-devel] [PATCH proxmox-backup v4 4/4] api: " Gabriel Goller
2024-06-13 13:56 ` [pbs-devel] [PATCH proxmox{, -backup} v4 0/4] proxmox-log introduction Gabriel Goller
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=20240417141323.144861-1-g.goller@proxmox.com \
--to=g.goller@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.