We have configured jboss to send us an email whenever an error occurs.
We're using the basic configuration in jboss-log4j.xml.
<appender name="SMTP" class="org.apache.log4j.net.SMTPAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="Threshold" value="ERROR"/>
<param name="To" value="user@xyz.com"/>
<param name="From" value="jboss@xyz.com"/>
<param name="Subject" value="JBoss Sever Errors"/>
<param name="SMTPHost" value="localhost"/>
<param name="BufferSize" value="10"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%d{ABSOLUTE},%c{1}] %m%n"/>
</layout>
</appender>
Well last night an error happened in a tight loop and this morning i had 200,000 emails in my inbox.
Is there a way to configure the email notifications to prevent this? (configure it so it only sends a maximum number of emails in a given time or something)
I'm not really sure what options are supported and i didn't have much luck with google.
Any help is appreciated.