You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by shashikiran <ms...@rediffmail.com> on 2005/09/21 12:21:07 UTC
Re: Error in setting up syslogging
Hi Ian,
The problem is because of not specifying the layout for the SyslogAppender.
I faced the same problem and on looking into the SysLogAppender class, I found
out a method called requiresLayout() which returned true indicating that this
Appender mandatorily requires to have a layout.
Sample log4j.xml :
<appender name="SYSLOG" class="org.apache.log4j.net.SyslogAppender">
<param name="Facility" value="LOCAL7"/>
<param name="FacilityPrinting" value="true"/>
<param name="SyslogHost" value="192.168.136.33"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d [%-5p] %-6r %x - %m%n"/>
</layout>
</appender>
Regards,
-Shashi
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org