All,
On 11/17/16 10:28 AM, Christopher Schultz wrote:
>> So, I implemented an event trigger class in my driver class like this:
>>
>> package com.my;
>> public class Driver
>> {
>> [...]
>> public static class NeverTriggeringEventEvaluator
>> implements TriggeringEventEvaluator
>> {
>> @Override
>> public boolean isTriggeringEvent(LoggingEvent arg0) {
>> return false;
>> }
>> }
>> }
>>
>> I enabled it in my configuration file like this:
>>
>> log4j.appender.CLIENT.evaluatorClass=com.my.Driver$NeverTriggeringEventEvaluatorWhen using this NeverTriggeringEventEvaluator, I'm getting the behavior I want: all of my error messages are being sent in a single email message. Thanks to all involved. I may update it to be sensitive to the number of logging events so that it never actually loses events. Right now, I believe if I hit 501 events, I'll lose one in the message that is sent when the appender is shut-down. -chris
signature.asc
Description: OpenPGP digital signature
