logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Steele" <pste...@maxiscale.com>
Subject RE: Using the syslog appender in log4cxx
Date Thu, 05 Jun 2008 14:39:00 GMT
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:psteele@maxiscale.com] 
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
>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
>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
>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.


View raw message