irqbalance/backport-filter-console-only-output-when-using-journal-mode.patch
yangpan 24db4431c5 backport community patches
(cherry picked from commit c371535d450a2dff7f59c236261e3b7da14468c4)
2024-05-07 17:10:12 +08:00

31 lines
940 B
Diff

From f3282f4ddc10be44e6c423de6de8db600f748f85 Mon Sep 17 00:00:00 2001
From: Neil Horman <nhorman@openssl.org>
Date: Thu, 30 Nov 2023 16:55:30 -0500
Subject: [PATCH] filter console only output when using journal mode
Fixes #281
Reference: https://github.com/Irqbalance/irqbalance/commit/f3282f4ddc10be44e6c423de6de8db600f748f85
Conflict: NA
---
irqbalance.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/irqbalance.h b/irqbalance.h
index 46e05ca..7b47cd1 100644
--- a/irqbalance.h
+++ b/irqbalance.h
@@ -138,7 +138,8 @@ extern unsigned int log_mask;
#ifdef HAVE_LIBSYSTEMD
#define log(mask, lvl, fmt, args...) do { \
if (journal_logging) { \
- sd_journal_print(lvl, fmt, ##args); \
+ if (log_mask & mask & TO_SYSLOG) \
+ sd_journal_print(lvl, fmt, ##args); \
if (log_mask & mask & TO_CONSOLE) \
printf(fmt, ##args); \
} else { \
--
2.28.0.windows.1