|
From: Derek A. <wa...@MI...> - 2002-09-18 01:16:37
|
The RemoteSyslogAppender in both 0.3.2rc4 and rc5 fail to log
to the proper facility. In fact, it will always log to LOG_KERN
(which is not what I want).
This patch fixes the code to log properly (given a valid facility):
--- src/RemoteSyslogAppender.cpp~ Tue Jul 2 18:14:37 2002
+++ src/RemoteSyslogAppender.cpp Tue Sep 17 20:41:39 2002
@@ -125,7 +125,7 @@
std::string message(_getLayout().format(event));
int len = message.length() + 16;
char *buf = new char [len];
- int priority = toSyslogPriority(event.priority);
+ int priority = _facility + toSyslogPriority(event.priority);
int len2 = sprintf (buf, "<%d>", priority);
memcpy (buf + len2, message.data(), len - 16);
sockaddr_in sain;
Thanks,
-derek
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
wa...@MI... PGP key available
|