tdecacqu / rpms / systemd

Forked from rpms/systemd 3 years ago
Clone
a1c89c5
From 43de46ab92e3b343c2e35b42cf0728a9adf48f1c Mon Sep 17 00:00:00 2001
a1c89c5
From: Lennart Poettering <lennart@poettering.net>
a1c89c5
Date: Thu, 1 Sep 2011 21:15:00 +0200
a1c89c5
Subject: [PATCH] stdout-bridge: set facility of messages with no facility to
a1c89c5
 configured facility instead of LOG_USER
a1c89c5
a1c89c5
---
a1c89c5
a1c89c5
[ fixed the filename -- michich ]
a1c89c5
a1c89c5
diff --git a/src/stdout-syslog-bridge.c b/src/stdout-syslog-bridge.c
a1c89c5
index 48a301f..7358a42 100644
a1c89c5
--- a/src/logger.c
a1c89c5
+++ b/src/logger.c
a1c89c5
@@ -111,9 +111,9 @@ static int stream_log(Stream *s, char *p, usec_t ts) {
a1c89c5
         if (*p == 0)
a1c89c5
                 return 0;
a1c89c5
 
a1c89c5
-        /* Patch in LOG_USER facility if necessary */
a1c89c5
+        /* Patch in configured facility if necessary */
a1c89c5
         if ((priority & LOG_FACMASK) == 0)
a1c89c5
-                priority = LOG_USER | LOG_PRI(priority);
a1c89c5
+                priority = (s->priority & LOG_FACMASK) | priority;
a1c89c5
 
a1c89c5
         /*
a1c89c5
          * The format glibc uses to talk to the syslog daemon is:
a1c89c5
-- 
a1c89c5
1.7.4.4
a1c89c5