I am sorry but I have provided the wrong information in my
previous post.

The correct syntax for specifying a custom priority (renamed to
level in log4j 1.2) within the <priority> element is:

  <root>
     <priority value="TRACE" class="some.package.XLevel"/>
     <appender-ref ref="TEMP" />
   </root>

Outside the <priority> element the syntax is:

     <filter class="org.apache.log4j.varia.LevelMatchFilter">
       <param name="LevelToMatch" value="TRACE#some.package.XLevel" />
       <param name="AcceptOnMatch" value="true" />
     </filter>

I hope this helps. We'll unify the syntax in a future version of log4j.

At 00:16 13.03.2002 +0100, Ceki Gülcü wrote:

>The syntax is
>
>  <priority value ="TRACE#some.package.XLevel" />
>
>where some.package.XLevel is the fully qualified name of
>the XLevel class.
>
>You might find log4j internal debug messages useful. They can
>be enabled from within your XML config file:
>
><?xml version="1.0" encoding="UTF-8" ?>
><!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
>
><log4j:configuration debug="true" 
>xmlns:log4j='http://jakarta.apache.org/log4j/'>
>....
></log4j:configuration>
>
>or on the command line:
>
>    java -Dlog4j.debug  com.foo.YourApplication
>
>Hope this helps, Ceki
>
>At 17:54 12.03.2002 -0500, Naveen Bathula wrote:
>>I coded a Custom class called XLevel which extends Level that has my own
>>custom definitions
>>How do I set this Level in the Logger's XML Configuration.
>>For example:
>>TRACE is custom defined Level
>>  <priority value ="TRACE" />
>>dosen't seem to work. It gives me all the debug messages even though TRACE >
>>DEBUG
>>
>>Thanks
>>-Naveen
>
>--
>Ceki
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>

--
Ceki


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to