"it does not work": no output? error message? exception? machine catches 
on fire?

make sure that your syslog is set up to receive from the network (default 
port udp port 514) , and not just /dev/log. 

'hostname' is indeed the name of the machine running the syslog daemon?


Douglas E Wegscheid
Lead Technical Analyst, Whirlpool Corporation
(269)-923-5278

"A wrong note played hesitatingly is a wrong note. A wrong note played 
with conviction is interpretation."



DASHGIR <sandeep.mo...@fiserv.com> wrote on 06/26/2009 08:41:57 AM:

> 
> 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-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
> 

Reply via email to