Monday, May 24, 2010

Log 4j filter

Intro :

The log4j filter allows you to filter out logger statements based on the textual message in the logger . its helpful if you want to get rid of few logger statements for debugging purpose



ex :


<filter class="org.apache.log4j.varia.StringMatchFilter">

      <param name="StringToMatch" value="=================" />

      <param name="AcceptOnMatch" value="false" />

</filter>







this would not log the below log statement in the console


LOGGER.debug("The XML is ================="+ swRequestXml.toString());


No comments:

Post a Comment