Ron,

 

It’s likely going to need to be dynamic.   Since once we turn on smtp 
notification, there might be other offenders that are identified and will need 
to be added.

 

Brian

 

From: Ron Grabowski [mailto:rongrabow...@yahoo.com] 
Sent: Monday, April 19, 2010 10:55 PM
To: Log4NET User
Subject: Re: Filters with AND/OR conditions.

 

Can you deploy assemblies to the server and just hard-code your logic check 
using C#:

public class MyFilter : FilterSkeleton
{
    public override FilterDecision Decide(LoggingEvent loggingEvent)
    {
        /*
        If (Property1 = “111” && Property2 = “abc” ) ||
            (Property1 = ”111” && Property2 = “bbb”) ||
            (Property1 = ”222” && Property2 = “def”) ||
            (Property1 = ”333” && Property2 = “xyz”))
        Then
            Deny
        Else
            Accept
        */
    }
}

or must it by dynamic?

 

________________________________

From: Brian Carlson <bcarl...@tier.com>
To: log4net-user@logging.apache.org
Sent: Mon, April 19, 2010 5:07:38 PM
Subject: Filters with AND/OR conditions.




I have 2 properties that I need to filter log messages based upon.  I have 
setup an smtp appender for Error and Fatal log messages, but a couple 
components didn’t implement logging properly and are logging errors when they 
don’t exist.  That problem is being dealt with.  So I’m trying to take care of 
those messages with filters.  What is the best way to setup something like this:

 

If (Property1 = “111” && Property2 = “abc” )  || 

    (Property1 = ”111” && Property2 = “bbb”) ||

    (Property1 = ”222” && Property2 = “def”) ||

    (Property1 = ”333” && Property2 = “xyz”))

Then

                Deny

Else

                Accept

 

 

Any help would be great.

 

Thanks,

Brian

Reply via email to