From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <g.goller@proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id 8560BBAC9A
 for <pbs-devel@lists.proxmox.com>; Fri, 15 Dec 2023 14:56:43 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id 6EF1E3421
 for <pbs-devel@lists.proxmox.com>; Fri, 15 Dec 2023 14:56:43 +0100 (CET)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [94.136.29.106])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS
 for <pbs-devel@lists.proxmox.com>; Fri, 15 Dec 2023 14:56:40 +0100 (CET)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id DBBC447673
 for <pbs-devel@lists.proxmox.com>; Fri, 15 Dec 2023 14:56:39 +0100 (CET)
Message-ID: <060bc361-b317-471e-aadb-89a0da8d99f3@proxmox.com>
Date: Fri, 15 Dec 2023 14:56:38 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
From: Gabriel Goller <g.goller@proxmox.com>
To: pbs-devel@lists.proxmox.com
Reply-To: Proxmox Backup Server development discussion
 <pbs-devel@lists.proxmox.com>
References: <20231103112849.71953-1-g.goller@proxmox.com>
In-Reply-To: <20231103112849.71953-1-g.goller@proxmox.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL -0.143 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DMARC_MISSING             0.1 Missing DMARC policy
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
 T_SCC_BODY_TEXT_LINE    -0.01 -
 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more
 information. [pull.rs, directory.rs, lib.rs, mod.rs, drive.rs, acme.rs,
 rest.rs, node.rs, zfs.rs, proxmox-backup-proxy.rs, restore.rs, metrics.rs,
 proxmox-backup-api.rs, verify.rs, worker-task-abort.rs, datastore.rs, apt.rs,
 backup.rs, certificates.rs]
Subject: Re: [pbs-devel] [PATCH proxmox-backup 0/2] proxmox-log introduction
X-BeenThere: pbs-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox Backup Server development discussion
 <pbs-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pbs-devel>, 
 <mailto:pbs-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pbs-devel/>
List-Post: <mailto:pbs-devel@lists.proxmox.com>
List-Help: <mailto:pbs-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel>, 
 <mailto:pbs-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Fri, 15 Dec 2023 13:56:43 -0000

bump.

On 11/3/23 12:28, Gabriel Goller wrote:
> 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 loggin 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 (with the "tasklog"
> attribute), it will get the file_logger from TLS and write to the file.
>
>
> Changes since RFC v2:
>   - Combined syslog and tasklog to single layer
>   - Infer the logging target from the FileLogger TLS
>
> Changes since RFC v1:
>   - 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
>
> Gabriel Goller (1):
>    proxmox-log: added tracing infra
>
>   Cargo.toml                                    |   6 +
>   proxmox-log/Cargo.toml                        |  23 ++++
>   proxmox-log/debian/changelog                  |   5 +
>   proxmox-log/debian/control                    |  53 +++++++++
>   proxmox-log/debian/copyright                  |  18 +++
>   proxmox-log/debian/debcargo.toml              |   7 ++
>   .../src/file_logger.rs                        |   2 +-
>   proxmox-log/src/lib.rs                        |  34 ++++++
>   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        | 108 +++++++++---------
>   proxmox-sys/src/worker_task_context.rs        |  47 --------
>   15 files changed, 315 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
>
>
> Gabriel Goller (1):
>    log: removed task_log! macro and moved to tracing
>
>   Cargo.toml                       |  61 ++++----
>   pbs-api-types/src/metrics.rs     |   1 -
>   pbs-api-types/src/node.rs        |   3 +-
>   pbs-datastore/Cargo.toml         |   1 +
>   pbs-datastore/src/chunk_store.rs |  30 +---
>   pbs-datastore/src/datastore.rs   |  70 ++++-----
>   src/api2/admin/datastore.rs      |  24 ++--
>   src/api2/admin/metrics.rs        |   2 +-
>   src/api2/config/acme.rs          |  20 +--
>   src/api2/config/datastore.rs     |  12 +-
>   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       |   6 +-
>   src/api2/node/disks/zfs.rs       |  30 ++--
>   src/api2/node/mod.rs             |  11 +-
>   src/api2/pull.rs                 |  28 ++--
>   src/api2/tape/backup.rs          |  77 ++++------
>   src/api2/tape/drive.rs           | 135 +++++++----------
>   src/api2/tape/restore.rs         | 240 ++++++++++---------------------
>   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               | 166 ++++++++-------------
>   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      |  85 +++++------
>   tests/worker-task-abort.rs       |   9 +-
>   31 files changed, 502 insertions(+), 870 deletions(-)
>