public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Gabriel Goller" <g.goller@proxmox.com>
To: "Wolfgang Bumiller" <w.bumiller@proxmox.com>
Cc: <pbs-devel@lists.proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox v3 3/3] proxmox-log: added tracing infra
Date: Thu, 11 Apr 2024 15:07:53 +0200	[thread overview]
Message-ID: <D0HBEY9UZCVL.2591WJN9UQMIM@proxmox.com> (raw)
In-Reply-To: <cqi2oxjjs2dataefjyge7gqlwmto3tin2egticwngreloghjad@b6342w56ebv6>

On Thu Apr 11, 2024 at 2:08 PM CEST, Wolfgang Bumiller wrote:
> On Wed, Apr 10, 2024 at 04:17:17PM +0200, Gabriel Goller wrote:
> > diff --git a/proxmox-log/Cargo.toml b/proxmox-log/Cargo.toml
> > new file mode 100644
> > index 0000000..e05b0be
> > --- /dev/null
> > +++ b/proxmox-log/Cargo.toml
> > @@ -0,0 +1,23 @@
> > +[package]
> > +name = "proxmox-log"
> > +version = "0.1.0"
> > +authors.workspace = true
> > +edition.workspace = true
> > +license.workspace = true
> > +repository.workspace = true
> > +description = "Logging infrastructure for proxmox"
> > +
> > +exclude.workspace = true
> > +
> > +[dependencies]
> > +anyhow.workspace = true
> > +syslog.workspace = true
> > +nix.workspace = true
> > +log.workspace = true
> > +tracing.workspace = true
> > +tracing-subscriber.workspace = true
> > +tracing-log.workspace = true
>
> Technically we also need `features = [ "std" ]` here. Currently this is
> pulled in by `tracing-subscriber`
> ...
>

Setting it explicitly never hurt anybody :)

> > diff --git a/proxmox-log/debian/copyright b/proxmox-log/debian/copyright
> > new file mode 100644
> > index 0000000..0d9eab3
> > --- /dev/null
> > +++ b/proxmox-log/debian/copyright
> > @@ -0,0 +1,18 @@
> > +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
> > +
> > +Files:
> > + *
> > +Copyright: 2019 - 2023 Proxmox Server Solutions GmbH <support@proxmox.com>
>
> (2024)
>

Fixed.

> > diff --git a/proxmox-log/src/lib.rs b/proxmox-log/src/lib.rs
> > new file mode 100644
> > index 0000000..15fa22d
> > --- /dev/null
> > +++ b/proxmox-log/src/lib.rs
> > @@ -0,0 +1,34 @@
> > +use std::{cell::RefCell, env};
> > +use syslog_tasklog_layer::SyslogAndTasklogLayer;
> > +use tracing_log::{AsLog, LogTracer};
> > +use tracing_subscriber::filter::LevelFilter;
> > +use tracing_subscriber::prelude::*;
> > +
> > +mod file_logger;
> > +pub use file_logger::{FileLogOptions, FileLogger};
> > +
> > +mod syslog_tasklog_layer;
> > +
> > +tokio::task_local! {
> > +    pub static LOGGER: RefCell<FileLogger>;
> > +    pub static WARN_COUNTER: RefCell<u64>;
>
> `WARN_COUNTER` could just be a `Cell`.
>

Oooh, good catch!

Pulled in all your other suggestions as well.




      parent reply	other threads:[~2024-04-11 13:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-10 14:17 [pbs-devel] [PATCH proxmox{-backup, } v3 0/3] proxmox-log introduction Gabriel Goller
2024-04-10 14:17 ` [pbs-devel] [PATCH proxmox-backup v3 1/3] removed task_log! macro and moved to tracing Gabriel Goller
2024-04-10 14:17 ` [pbs-devel] [PATCH proxmox-backup v3 2/3] removed task_log! macro and moved to tracing in api Gabriel Goller
2024-04-10 14:17 ` [pbs-devel] [PATCH proxmox v3 3/3] proxmox-log: added tracing infra Gabriel Goller
2024-04-11 12:08   ` Wolfgang Bumiller
2024-04-11 12:09     ` Wolfgang Bumiller
2024-04-11 13:07     ` Gabriel Goller [this message]

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=D0HBEY9UZCVL.2591WJN9UQMIM@proxmox.com \
    --to=g.goller@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    --cc=w.bumiller@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal