edwardsbean
edwardsbean

Reputation: 3769

Log4j exception lead to application abort

My java application use log4j(flume appender with AsyncAppender) to log to remote log server. If log server is down, log4j will try to reconnect a few times,but then my java application was shutdown.Is there any possible my java application goes normal with the exception of log4j?

Upvotes: 1

Views: 139

Answers (2)

edwardsbean
edwardsbean

Reputation: 3769

the right solution is : use AsyncAppender with FlumeAppender. more detail see http://edwardsbean.github.io/blog/2014/01/14/flume-in-action-1/

Upvotes: 1

Aravind Yarram
Aravind Yarram

Reputation: 80176

You have two choices

  1. Catch the exception and ignore it
  2. set the UnsafeMode property to true.

Upvotes: 0

Related Questions