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 Karena Schroven <ka...@yahoo.de> on 2007/03/30 13:33:19 UTC
Failover with log4j 1.3: How to set up a backup appender?
Hi,
I have problems configuring a backup appender.
What I want to do is the following:
I have different clients which send messages to a log server. When the server is down for some reason, a backup server should receive these messages.
My client config file looks like this:
<appender name="backup" class="org.apache.log4j.net.SocketAppender">
<param name="RemoteHost" value="localhost" />
<param name="Port" value="4560" />
<param name="LocationInfo" value="True" />
</appender>
<appender name="LogServer" class="org.apache.log4j.net.SocketAppender">
<param name="RemoteHost" value="logger.XXX.local" />
<param name="Port" value="4565" />
<param name="LocationInfo" value="True" />
<errorHandler class="org.apache.log4j.varia.FallbackErrorHandler">
<root-ref/>
<appender-ref ref="backup"/>
</errorHandler>
</appender>
<root>
<priority value="All" />
<appender-ref ref="LogServer" />
</root>
I am using log4j 1.3alpha-8. I looked in this list and saw that there is no error handling anymore in version 1.3.
But the mechanism with errorHandler provided with log4j 1.2.14 seems to be exactly what I want to do. Is there a way with log4j 1.3 to do this easily?
Any help would be appreciated.
Thanks,
Karena
___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org