Hi,

I want to we able to set log4j configuration externally (using
property file) such that if there is a problem in using a 
particular specified appender, an alternate appender is enabled 
automatically. I believe I might be able to do this programmatically 
using log4j APIs, but I am more interested in knowing whether 
some mechanism exists to achieve this thru a property file.

The scenario I have is that by default I want to send all 
my logs to a remote "SocketServer" based log4j server (using 
SocketAppender). However, if log4j server is not available, I 
want to be able to print my logs onto the local process's 
console. Please note that I want to do this only in a situation 
when remote log4j server is not reachable to SocketAppender. 
Obviously, if I were to configure both appenders (Console and 
Socket appender) in my property file in a normal fashion, I would
be always getting the messages on local process's console 
irrespective of whether or not messages are getting logged 
on remote log4j server.

Would appreciate ideas/suggestions.

Thanks,
Rajnish

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to