public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Gabriel Goller <g.goller@proxmox.com>
To: Thomas Lamprecht <t.lamprecht@proxmox.com>
Cc: Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>
Subject: Re: [pbs-devel] applied: [PATCH] log: only print error level to syslog/stderr
Date: Mon, 21 Oct 2024 09:48:14 +0200	[thread overview]
Message-ID: <20241021074814.zybkkszsqyg4lgrk@luna.proxmox.com> (raw)
In-Reply-To: <b68b6c91-4091-44a3-b0e5-ede3605ccc18@proxmox.com>

On 18.10.2024 19:03, Thomas Lamprecht wrote:
>Am 18/10/2024 um 13:11 schrieb Gabriel Goller:
>> We only want to print the error level, and not all the levels below
>> error to stderr/syslog.
>>
>> Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
>> ---
>>
>> Note: the sign was reversed "<=" would have been correct, because we
>> want to print everything that's *less* verbose than Level::ERROR, but
>
>Yeah, this can be easily confusing w.r.t. level and ordered by higher
>verbosity or higher impact..
>
>> there is nothing lower than ERROR, so == is better.
>
>probably stems from thinking about syslog, where there is CRIT, ALERT and
>EMERG as higher (=worse) level than error.
>
>FWIW, while all those levels are maybe a bit much, I miss at least the NOTICE
>one that sits between INFO and WARNING and a higher ERROR one could be useful
>for security/data-impact situations.

Sadly that's not currently possible with tracing (it's also not really
planned), althought we could do something like:

     tracing::error!(custom_level = "emergency", "emergency log message");

and then in the custom layer read the attribute and set the syslog
EMERGENCY level.

>>
>>  proxmox-log/src/lib.rs | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>>
>
>applied, thanks!

Thanks!


_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


      reply	other threads:[~2024-10-21  7:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-18 11:11 [pbs-devel] " Gabriel Goller
2024-10-18 17:03 ` [pbs-devel] applied: " Thomas Lamprecht
2024-10-21  7:48   ` 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=20241021074814.zybkkszsqyg4lgrk@luna.proxmox.com \
    --to=g.goller@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    --cc=t.lamprecht@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