代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/libvirt 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From aaff56af24b3931e08b28a994a4953c1a0d1851b Mon Sep 17 00:00:00 2001
From: wangmeiyang <wangmeiyang_yewu@cmss.chinamobile.com>
Date: Wed, 23 Nov 2022 17:16:24 +0800
Subject: [PATCH 05/23] util: fix syslog facility value
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
We set SYSLOG_PRIORITY when sending to journald to avoid our
messages getting tagged with the default facility which is
used for the kernel.
Unfortunately:
commit fd00f0e6c75b00c3d97be8670afcd9094b823855
Author: Guido Günther <agx@sigxcpu.org>
Date: Mon Sep 21 20:06:55 2015 +0200
Use daemon log facility for journald
used the LOG_nnn constants from the syslog header without realizing
that these values have a bit-shift applied. While Linux defines a
LOG_FAC() macros to undo the bit-shift this doesn't appear to be
standardized. So the safe thing is to just use the raw value since
these values are fixed by RFC 5424.
cherry-pick from 017fa1e097769455c0cd8929760cf9ff52a556ec
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Meiyang Wang <wangmeiyang@cmss.chinamobile.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
---
src/util/virlog.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/util/virlog.c b/src/util/virlog.c
index e4944d1258..07d4eb4123 100644
--- a/src/util/virlog.c
+++ b/src/util/virlog.c
@@ -932,7 +932,14 @@ virLogOutputToJournald(virLogSourcePtr source,
journalAddString(&state, "MESSAGE", rawstr);
journalAddInt(&state, "PRIORITY",
virLogPrioritySyslog(priority));
- journalAddInt(&state, "SYSLOG_FACILITY", LOG_DAEMON);
+ /* See RFC 5424 section 6.2.1
+ *
+ * Don't use LOG_nnn constants as those have a bit-shift
+ * applied for use with syslog() API, while journald
+ * needs the raw value
+ */
+ journalAddInt(&state, "SYSLOG_FACILITY", 3);
+
journalAddString(&state, "LIBVIRT_SOURCE", source->name);
if (filename)
journalAddString(&state, "CODE_FILE", filename);
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。