Total Pageviews

Thursday, August 02, 2012

SMTP Appender with logback and reducing log messages in email

Logback has some pretty cool features which makes developer life so much easier. Among them is configuring the buffer size of the log messages. Especially in conjunction with error messages delivered by the email appender adjusting the buffer size is very useful.
This blog entry shows you how to configure email alerts with logback and how to reduce the quantity of log messages in the error mail.
The default buffer size for log messages is set to 256 which might scatter your email with too much infos. The example given in the blog reduces the lines to 5 so you will receive only the latest 4 log messages (if logged) previously issued by your application including the error log message.

No comments:

Post a Comment