logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tech Newbie <tec...@yahoo.com>
Subject Multiple expressions define in one ExpressionFilter?
Date Sat, 27 Nov 2010 01:11:47 GMT
Is it possible to define multiple expressions in one single ExpressionFilter?  For example,
I want to filter out two different texts in two different classes but this doesn't work. 
Only the 2nd definition takes effect.

<filter class="org.apache.log4j.filter.ExpressionFilter">
  <param name="Expression" value="LOGGER ~= class1 &amp;&amp; MSG ~= test1"/>
  <param name="Expression" value="LOGGER ~= class2 &amp;&amp; MSG ~= test2"/>
  <param name="AcceptOnMatch" value="false"/>
</filter>

I have to separate them out in their individual <filter> element.  




      
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message