logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DASHGIR <sandeep.mo...@fiserv.com>
Subject SyslogAppender on linux and aix
Date Fri, 26 Jun 2009 12:41:57 GMT

I am trying to use SyslogAppender for Linux and AIX. It does not work.
This is my properties file

log4j.info=true
log4j.rootLogger=INFO, FILE, SYSLOG
log4j.appender.FILE=org.apache.log4j.ConsoleAppender
log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
log4j.appender.FILE.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
log4j.appender.SYSLOG=org.apache.log4j.net.SyslogAppender
log4j.appender.SYSLOG.syslogHost=hostname
log4j.appender.SYSLOG.layout=org.apache.log4j.PatternLayout
log4j.appender.SYSLOG.layout.ConversionPattern=%p: %c - %m
log4j.appender.SYSLOG.Facility=USER

The code which uses it is simple

public static void main(String[] args) {
		// TODO Auto-generated method stub
		PropertyConfigurator.configure("log.properties");
		
		Logger logger = Logger.getLogger(SyslogAppenderTest.class.getName());
		
		
		logger.info("******This test message******");
	}

The syslog.conf contains the entry

user.info       /var/log/syslogtest.log



-- 
View this message in context: http://www.nabble.com/SyslogAppender-on-linux-and-aix-tp24219637p24219637.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message