2 Replies Latest reply on Jan 24, 2006 10:47 AM by flindet

    Configure log4j email appender

    flindet

      Hi,

      I've successfully configured my log4j.xml to send emails whenever any ERROR or FATAL log message occurs. It works great, except that when something nasty happens we often get hundreds or sometimes thousands of emails!

      I'd like to get the number of emails down to something manageable so that we can be paged when an error condition occurs. We did contact JBoss support, and they recommended writing a custom Filter, but that's proving to be a bit tricky to remember the previous log messages in a given timeframe (sorry, we're new).

      Searching the net, I've stumbling across a few mentions of combining the AsyncAppender with the SMTPAppender somehow to deal with my exact problem. Though, I couldn't find any detailed conversation or examples.

      Does anyone know if the AsyncAppender can be used to somehow cut down on the number of redundant emails (emails with the same error message, but different timestamp)? I'm sure we're not the first ones to want less than hundreds of emails within a few minutes. ;-) If anyone can point me in the write direction of where to look or even share some quick configuration or Filter examples, that sure would be appreciated.

      Thank you!

      I'm using JBoss 4.0.3SP1 on Solaris.