Remko,
Thanks for the answer. After looking into the sources some more I found
this:
- SMTPAppender.append(), which seems to be the usual way of events being
logged to this appender, sends the mail directly.
- SMTPAppender.isFiltered(), which is an overriding of the usual logic
Matej,
Suppose you have 3 threads that all log an error at exactly the same time.
They all call isFiltered at the same time, and all events are added to the
buffer before any thread had a chance to call the append method.
Now all three threads will call the append method. The first time, 3
Thanks Remko,
I understand it much better now. However, this one still eludes me: if you
look into AppenderControl.callAppender(), there is a line like this:
if (appender instanceof Filterable ((Filterable)
appender).isFiltered(event)) {
return;
}
If I
Your understanding is correct. The intention is to include the last n log
events in the email when an error occurs, regardless of their log level. This
is often useful for debugging. I believe this behavior carried over from
either log4j 1.x or logback - I'm not really sure since someone else
Hi,
it is my pleasure to announce to the community
that Nick Williams has joined our ranks.
He made remarkable contributions to log4j 2
and we all believe he is a valuable member
of Apache Logging Services now and in future.
Kind regards,
Christian