|
From: Bastiaan B. <Bas...@li...> - 2002-09-18 09:19:21
|
Hi Derek, Thanks for the report. This bug appears to be present in all log4cpp versions. Merged your patch, 0.3.2 final should be OK. Cheers, Bastiaan On Wed, 2002-09-18 at 03:16, Derek Atkins wrote: > 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 |