Dear Ceki G�lk� and all Thank you very much ! It's working.
I include the NDCMatchFilter from the following page in the log4j.jar http://cvs.apache.org/viewcvs/jakarta-log4j-sandbox/src/java/org/apache/ log4j/filter/ With the following filter rule it is working. <filter class="org.apache.log4j.filter.NDCMatchFilter"> <param name="ValueToMatch" value="1234"/> </filter> What about these filters in the jakarta-log4j-sandbox ? Is there a plan to inlcude them in the next version of log4j ? Regards Joerg > -----Original Message----- > From: Ceki G�lc� [mailto:[EMAIL PROTECTED] > Sent: Friday, June 13, 2003 9:03 AM > To: Log4J Users List > Subject: Re: Filter rules for DOMConfigurator and NDC > > > At 07:17 PM 6/12/2003 +0200, Joerg Eggink wrote: > >Dear all > > > >I have one question about NDC element and Filter rules. > >Is it possible to make a StringFilter for a NDC value ? > > > >Example: > >Following filter rule for a file appender > ><filter class="org.apache.log4j.varia.StringMatchFilter"> > > <param name="StringToMatch" value="1234"/> > > <param name="AcceptOnMatch" value="true"/> > ></filter> > > > >And > > NDC.push ("User:" +1234); > > > > > >Does log4j write only the statements in the log file with > this String. > > The StringMatchFilter only acts on the message string not the > NDC or MDC. > You can write your own filter which is quite easy to do. > Otherwise, have a > look at the log4j-sandbox: > http://cvs.apache.org/viewcvs/jakarta-log4j-sandbox/src/java/org/apache/ log4j/filter/ >May be it is stupid question but I tried and it was not working >correct. Unfortunately I have not so much information about NDC >functionality and XML rules. The manual book needs long time to deliver >;-( Lehmanns books (www.lob.de) probably ran out of stock. In any case, a new shipment is on its way. >Joerg -- Ceki For log4j documentation consider "The complete log4j manual" ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp In the USA the log4j manual is carried by Softpro books. http://store.yahoo.com/softpro/2-9700369-0-8.html --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
