On Thu, Jun 5, 2008 at 10:39 AM, Peter Steele <[EMAIL PROTECTED]> wrote:
> I've been able to get the syslog appender to work, with one exception.
> For our Java apps that use log4j, I have set up a custom entry in
> /etc/syslog.conf for the local7 facility so that messages targeting this
> facility are all logged to a custom log file. In my log4j config file I
> simply have to set the Facility parameter to LOCAL7 to have log messages
> directed to this custom log file. This doesn't seem to work for log4cxx.
> I tried setting Facility to LOCAL7 and the log messages disappeared. It
> seems I have to use DAEMON, and this directs log messages to
> /var/log/messages. I'd prefer to have log4cxx send log messages to the
> same LOCAL7 log file that we use for our Java apps. Any suggestions on
> how to accomplish this?
>
> -----Original Message-----
> From: Peter Steele [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 04, 2008 6:30 AM
> To: Log4CXX User
> Subject: RE: Using the syslog appender in log4cxx
>
>>While this version is no longer supported by the developers, the
> following
>>syslog appender works on my Debian systems running 0.9.7:
>
> Thanks for the xml snippet, I'll give this a try. And we may very well
> upgrade to the latest version, but we have 65+ machines with 0.9.7 so
> it's a bit of a job to get everything upgraded...
>
>>To troubleshoot, I'd start simple and go forward. Verify the rest of
> your
>>log4cxx.xml is correct by making sure it will log to the console and
> then to a
>>file. Then I'd try simpler syslog configurations without filters, error
> handlers
>>and using localhost.
>
> Right now file and console logging work fine, it's just the syslog
> appender that's causing us problems, even using localhost without
> filters. Hopefully your xml code will do the trick.
>
>>Going forward from there use tools like logger(1) to verify
>>your facility, sysloghost and other settings.
>
> I'm not familiar with logger; I'll have to check it out. Thanks.
>
> Peter
>
>


That is a bug in version 0.10.0 Local 2 and higher was not implemented
correctly. See this difference to see the cut-and-paste error:

<http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/cpp/syslogappender.cpp?r1=613005&r2=654960&pathrev=654960&diff_format=l>

It has already been fixed in the trunk version of the repository. See
this revision:

http://svn.apache.org/viewvc?view=rev&revision=654960


-- 
Dale King

Reply via email to