* [PATCH] logger: make unix socket logging to use syslog_local format by default
@ 2015-03-05 21:12 Sami Kerola
2015-03-06 11:56 ` Karel Zak
0 siblings, 1 reply; 2+ messages in thread
From: Sami Kerola @ 2015-03-05 21:12 UTC (permalink / raw)
To: util-linux; +Cc: Sami Kerola, Rainer Gerhards
The message format when writing to local sockets were inconsistent since
commit 4de2e8a, for example:
$ ./logger --stderr test
<5>Mär 4 11:03:30 logger: test
$ ./logger --socket /dev/log --stderr test
<5>1 2015-03-04T11:03:31.699841+0100 ubuntu1404esp rger - [timeQuality ...
This change makes the --socket format to default use the same format as
the first message, as what used to be the case earlier. Notice that
full-blown RFC format on the log socket causes problems with receivers
who do not expect such format, like rsyslog.
Addresses: https://github.com/karelzak/util-linux/issues/157
Reported-by: Rainer Gerhards <rgerhards@adiscon.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
misc-utils/logger.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/misc-utils/logger.c b/misc-utils/logger.c
index 1e7e2dc..04d2453 100644
--- a/misc-utils/logger.c
+++ b/misc-utils/logger.c
@@ -484,7 +484,7 @@ static void logger_open(struct logger_ctl *ctl)
if (ctl->unix_socket) {
ctl->fd = unix_socket(ctl, ctl->unix_socket, ctl->socket_type);
if (!ctl->syslogfp)
- ctl->syslogfp = syslog_rfc5424;
+ ctl->syslogfp = syslog_local;
return;
}
ctl->fd = unix_socket(ctl, _PATH_DEVLOG, ctl->socket_type);
--
2.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-03-06 11:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-05 21:12 [PATCH] logger: make unix socket logging to use syslog_local format by default Sami Kerola
2015-03-06 11:56 ` Karel Zak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox