[logback-user] Sending only recent messages with SMTPAppender

Matthieu Desmons mdesmons at gresham-computing.com
Fri Dec 12 01:07:10 CET 2014


Hi,

The SMTPAppender can be configured to send only the latest X messages thanks to the BufferSize parameter.
But is there a way to filter messages so that it sends only the latest X messages emitted within say 1 hour?

This way, if an ERROR message happens, the email will only contain potential events that happened just recently.

I read the doc, don't think Filters or Evaluators will do it. As far as I can see my only option would be to develop my own CyclicBufferTracker and configure the SMTPAppender to use it, but I was wondering if:

a)      There's an easier way to do this?

b)      If there's no other way, would developing my own  CyclicBufferTracker work?

Thanks
Matthieu


Privileged or confidential information may be contained in this message. If you are not the addressee of this message please notify the sender by return and thereafter delete the message, and you may not use, copy, disclose or rely on the information contained in it. Internet e-mail may be susceptible to data corruption, interception and unauthorised amendment for which Gresham does not accept liability. Whilst we have taken reasonable precautions to ensure that this e-mail and any attachments have been swept for viruses, Gresham does not accept liability for any damage sustained as a result of viruses. Statements in this message that do not relate to the business of Gresham are neither given nor endorsed by the company or its directors. Gresham Computing plc Registered in England and Wales. Company No. 01072032 Registered Office: Aldermary House, 10-15 Queen Street, London, EC4N 1TX. Further information about Gresham Computing can be found on our website: www.gresham-computing.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20141212/5596df96/attachment.html>


More information about the Logback-user mailing list