Hi,
my understanding of the SMTPAppender is as follows:
i) it sends all the Logevents in its buffer when it receives an event of
priority "error".
ii) it stores all events with priority greater-equal the threshold-priority
and
ii) receives all events with priority greater-equal the category-priority.
What I want the SMTPAppender to do is to collect several events and send them
all at once. This can be done - as was suggested on the list - by providing a
TriggeringEventEvaluator object that counts up to the desired number of
messages and sends all of them when the count is reached.
The problem with this approach is that the application may end *before* the
count is reached and the unsended events in the buffer are lost! Okay, there
is the method sendBuffer(), but if the application is configured via
property- or xml-file it has no idea of the need to call this method.
For now I will subclass the SMTPAppender and add a finalize() method to call
the sendBuffer() method before object destruction, but it would be nice to
have this simple extension directly in the SMTPAppender class.
Any objections or other solutions?
Marco
--
Marco Ladermann
dpa, Deutsche Presse-Agentur GmbH
[EMAIL PROTECTED] (PGP-Schlüssel auf Anfrage)
Tel. +49 40 4113 2414 Fax +49 40 4113 2479
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]