Chris,

Glad to hear that. 

Be aware that Log4j 1 is broken in Java 9 so you will need to go to Log4j 2 
when you upgrade Java. 

Remko

Sent from my iPhone

> On 1 Dec 2016, at 1:41, Christopher Schultz <[email protected]> 
> wrote:
> 
> 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$NeverTriggeringEventEvaluator
> 
> When 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
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to