Hi

I've create a custom level, SLevel, similar to one defined in 
tests/src/xml/xlevel.h. However, when I tried to get this new level to work, 
log4cxx cannot find my class. Below are some settings I tried and the error 
returned. I'm using log4cxx 0.9.7.

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
          
<log4j:configuration debug="true" 
xmlns:log4j='http://jakarta.apache.org/log4j/'>
  <appender name="STDOUT" class="org.apache.log4j.ConsoleAppender">
    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d [%t] %-5p %X{Fcn}: %m%n"/>
    </layout>
  </appender>

  <root>
    <level value="dump" class="org.apache.log4j.xml.SLevel"/>
  </root>  
</log4j:configuration>

Threshold ="null".
Level value for root is [DUMP].
Desired Level sub-class: [org.apache.log4j.xml.SLevel]
Could not create level [DUMP]. Reported error follows.
Class 'org.apache.log4j.xml.SLevel' not found

and if I replace the class=="org.apache.log4j.xml.SLevel" with 
class="com.spanlink.util.log.SLevel" I get:

Threshold ="null".
Level value for root is [dump].
Desired Level sub-class: [com.spanlink.util.log.SLevel]
Could not create level [dump]. Reported error follows.
Class 'com.spanlink.util.log.SLevel' not found

Note that the second way works with log4j for my custom level implemented in 
Java. Can you tell me what I should put in the cfg file?

Thanks,
-Alvin

Reply via email to