Hi guys,

I want to redirect the output of my application to different syslog facilities depending on the situation. I set two appenders using the SyslogAppender but it seems I can't configure them to write directly to my syslog, but I have to open an UDP port in my syslog configuration. Do you know how I can do that? Is it possible? Since I have the syslog facilities configured on my own machine, I would like to avoid using UDP packages.

My log4j.xml file is:

Java Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
	debug="true">

	<appender name="loggerBI" class="org.apache.log4j.net.SyslogAppender">
		<param name="Facility" value="local0" />
		<param name="SyslogHost" value="localhost" />
		<param name="Threshold" value="DEBUG" />
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="%d{ISO8601} %5p %c{1}:%L - %m%n" />
		</layout>
	</appender>

	<appender name="loggerFDUR" class="org.apache.log4j.net.SyslogAppender">
		<param name="Facility" value="local1" />
		<param name="SyslogHost" value="localhost" />
		<param name="Threshold" value="DEBUG" />
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="%d{ISO8601} %5p %c{1}:%L - %m%n" />
		</layout>
	</appender>

	<root>
		<level value="DEBUG" />
		<appender-ref ref="loggerFDUR" />
	</root>

	<logger name="com.fon.duro.business.logging.ReportingUtils">
		<level value="DEBUG" />
		<appender-ref ref="loggerBI" />
	</logger>

</log4j:configuration>
I'm using syslog-ng as syslogger; to make it work, I had to add the following to the sources in my syslog-ng.conf file:

Java Code:
udp(ip("127.0.0.1") port(514)
Could you please help me out with that? Thank you in advance.

Kind regards,
Ojkar