Hi Ole, You have to pass there one of the following listed strings depending which category you want to log the message
"LOCAL0" "LOCAL1" "LOCAL2" "LOCAL3" "LOCAL4" "LOCAL5" "LOCAL6" "LOCAL7" You could later configure filters in order to store messages with the same facility id in one folder. Please confirm as well that the syslog port is open for the local machine otherwise you will not receive messages on the local machine. Does it work? Christian -----Original Message----- From: Ole Ersoy [mailto:[EMAIL PROTECTED] Sent: 20 October 2008 06:06 To: [email protected] Subject: Using the SyslogAppender Hi, I'm attempting to setup an test for logging with syslog to /var/log/test.log. So far I have this: public class Log4JTest extends TestCase { Logger logger = Logger.getLogger(Log4JTest.class.getName()); public void setUp() { SyslogAppender syslogAppender = new SyslogAppender(); BasicConfigurator.configure(); logger.addAppender(syslogAppender); syslogAppender.setSyslogHost("localhost"); syslogAppender.setFacility("?????"); syslogAppender.setLayout(new PatternLayout()); } public void testApp() { logger.info("I'm logging with syslog"); } } Does anyone know what I need to pass to setFacility, and whether I need to make any adjustments in /etc/rsyslog.conf for this to work? Thanks, - Ole --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
