Re: [Log4j] Appender error handling

2017-05-04 Thread Mikael Ståldal
But in this case the appender is created without problems and both errors occurs later when logging an event. (I configured FileAppender with createOnDemand="true" to acheive this effect.) On Thu, May 4, 2017 at 3:40 PM, Ralph Goers wrote: > There is a difference between errors that occur when

Re: [Log4j] Appender error handling

2017-05-04 Thread Ralph Goers
There is a difference between errors that occur when creating the Appender vs errors that occur in logging events. If an error occurs creating the Appender the rest of the configuration should be processed so that at least some logging works. If the error is too bad then the configuration will f

[Log4j] Appender error handling

2017-05-04 Thread Mikael Ståldal
AbstractOutputStreamAppender have this code: public void append(final LogEvent event) { try { tryAppend(event); } catch (final AppenderLoggingException ex) { error("Unable to write to stream " + manager.getName() + " for appender " + getName() + ": " + ex); throw ex