[logback-user] JaninoEventEvaluator Expression
Ceki Gülcü
ceki at qos.ch
Mon Nov 8 21:00:23 CET 2010
FYI, adding an OnConsoleStatusListener really can help in the diagnosis
of problems occurring post-configuration.
<configuration>
<statusListener
class="ch.qos.logback.core.status.OnConsoleStatusListener" />
....
</configuration>
On 08/11/2010 8:55 PM, Roberts, David wrote:
> Thanks. That worked. When I tried it before I actually had an error elsewhere in my expression. Doh!
>
> -----Original Message-----
> From: logback-user-bounces at qos.ch [mailto:logback-user-bounces at qos.ch] On Behalf Of Ceki Gülcü
> Sent: Monday, November 08, 2010 1:45 PM
> To: logback users list
> Subject: Re: [logback-user] JaninoEventEvaluator Expression
>
> Hi Dave,
>
> You need to write&& instead of&&. That's all...
>
> HTH,
>
> On 08/11/2010 8:07 PM, Roberts, David wrote:
>>
>> Is it possible to have an expression with multiple criteria?
>>
>> For example:
>>
>> <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
>>
>> <evaluator
>> class="ch.qos.logback.classic.boolex.JaninoEventEvaluator">
>> <expression>(logger.equals("mylogger")&& message.contains("my
>> message"))</expression>
>> </evaluator>
>> <OnMismatch>NEUTRAL</OnMismatch>
>> <OnMatch>DENY</OnMatch>
>> </filter>
>>
>> I have tried encoding the&& and using CDATA but logback still doesn't
>> accept it or perform correctly.
>>
>>
>> Dave
>>
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://qos.ch/mailman/listinfo/logback-user
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://qos.ch/mailman/listinfo/logback-user
More information about the Logback-user
mailing list