Hi I'm trying to create a log4j setup that sends an e-mail on most ERROR-messages that my application emits - primarily on exceptions. However it's difficult not to get flooded with e-mails since log4j outputs several ERROR-messages per exception like so:
2010-10-19 14:49:27,457 ERROR [Camel Thread 0 - file://data/in] [org.apache.camel.processor.DefaultErrorHandler]: Failed delivery for exchangeId: 1acc97f0-aefd-4c77-9ee1-10f0ae69af4b. Exhausted after delivery attempt: 1 caught: java.lang.Exception java.lang.Exception at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at ..... 2010-10-19 14:49:29,692 ERROR [Camel Thread 0 - file://data/in] [org.apache.camel.component.file.GenericFileOnCompletion]: Caused by: [java.lang.Exception - null] java.lang.Exception at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at ..... I have an appender like this: <appender name="mail" class="dk.mytest.SMTPSSLAppender"> <layout class="org.apache.log4j.HTMLLayout" /> <!-- Do not e-mail about this exception --> <filter class="org.apache.log4j.varia.StringMatchFilter"> </filter> </appender> Any ideas how to improve this either with Camel or log4j configuration? -- View this message in context: http://camel.465427.n5.nabble.com/Limit-ERROR-emits-for-logging-tp3218995p3218995.html Sent from the Camel - Users mailing list archive at Nabble.com.