all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH] log: reorder filters
@ 2024-07-15 15:13 Gabriel Goller
  2024-07-18 10:11 ` [pbs-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Gabriel Goller @ 2024-07-15 15:13 UTC (permalink / raw)
  To: pbs-devel

Reorder the filters for the journald layer. This sets the LevelFilter
last, which means tracing can disable all log statements lower than the
current level without evaluating the LogContext::exists function.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
---
 proxmox-log/src/lib.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/proxmox-log/src/lib.rs b/proxmox-log/src/lib.rs
index f4f24e0c43ab..990065150483 100644
--- a/proxmox-log/src/lib.rs
+++ b/proxmox-log/src/lib.rs
@@ -52,10 +52,10 @@ pub fn init_logger(
         .with(
             tracing_journald::layer()
                 .expect("Unable to open syslog")
-                .with_filter(log_level)
                 .with_filter(filter_fn(|metadata| {
                     LogContext::exists() || *metadata.level() == Level::ERROR
-                })),
+                }))
+                .with_filter(log_level),
         )
         .with(TasklogLayer {}.with_filter(log_level));
 
-- 
2.43.0



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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-07-18 10:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-15 15:13 [pbs-devel] [PATCH] log: reorder filters Gabriel Goller
2024-07-18 10:11 ` [pbs-devel] applied: " Thomas Lamprecht

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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal