* [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
* [pbs-devel] applied: [PATCH] log: reorder filters
2024-07-15 15:13 [pbs-devel] [PATCH] log: reorder filters Gabriel Goller
@ 2024-07-18 10:11 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2024-07-18 10:11 UTC (permalink / raw)
To: Proxmox Backup Server development discussion, Gabriel Goller
Am 15/07/2024 um 17:13 schrieb Gabriel Goller:
> 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(-)
>
>
applied, thanks!
_______________________________________________
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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox