if (!appender.isStarted()) {
appender.getHandler().error("Attempted to append to non-started appender " + appender.getName());
if (!appender.ignoreExceptions()) {
throw new AppenderLoggingException(
"Attempted to append to non-started appender " + appender.getName());
}
}
if (appender instanceof Filterable && ((Filterable) appender).isFiltered(event)) {
return;
}
try {
appender.append(event);
} catch (final RuntimeException ex) {
appender.getHandler().error("An exception occurred processing Appender " + appender.getName(), ex);
if (!appender.ignoreExceptions()) {
throw ex;
}
} catch (final Exception ex) {
appender.getHandler().error("An exception occurred processing Appender " + appender.getName(), ex);
if (!appender.ignoreExceptions()) {
throw new AppenderLoggingException(ex);
}
}
} finally {
recursive.set(null);
}