You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by Jitendra Kharche <Ji...@geometricsoftware.com> on 2006/05/29 17:06:34 UTC

log4cxx: No level could be found named "null".

I am getting the following error
 
log4cxx: No level could be found named "null".
 
What could be the reason. The log4cxx.xml file has following
configuration.
 
 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "./log4j.dtd">
 
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/
<http://jakarta.apache.org/log4j/> " debug="false">
 <appender name="LOGFILE"
class="org.apache.log4j.rolling.RollingFileAppender">
  <errorHandler class="org.apache.log4j.helpers.OnlyOnceErrorHandler"/>
  <param name="File" value="D:/logs/mylog.log"/>
  <param name="Append" value="true"/>
  <param name="Threshold" value="warn"/>
  <!-- Rollover at midnight each day -->
  <param name="DatePattern" value=".%Y-%m-%d"/>
  <param name="MaxFileSize" value="25MB" />
  <param name="MaxBackupIndex" value="10" />
  <layout class="org.apache.log4j.PatternLayout">
   <!-- The default pattern: Date Priority [Category] Message/n -->
   <param name="ConversionPattern" value="%d %-5p [%c{1}] %m%n"/>
   <!-- The full pattern: Date MS Priority [Category] (Thread:NDC)
Message/n -->
   <!-- param name="ConversionPattern" value="%d{%Y-%m-%d %H:%M:%S,%Q}
[%t] %-5p %c %x - %m%n"/ -->
  </layout>
 </appender>
 
 <root>
  <appender-ref ref="LOGFILE"/>
 </root>
</log4j:configuration>

 
Regards,
Jitendra
 
********************************************************************
This e-mail communication and any attachments are privileged and
confidential and intended only for the use of the recipients named
above. If you are not the intended recipient, please do not review,
disclose, disseminate, distribute or copy this e-mail and attachments.
If you have received this communication in error, please notify the
sender immediately by email or telephone at+91-20-22906351.
*********************************************************************
 

Re: log4cxx: No level could be found named "null".

Posted by Curt Arnold <ca...@apache.org>.
On May 29, 2006, at 10:06 AM, Jitendra Kharche wrote:

> I am getting the following error
>
> log4cxx: No level could be found named "null".
>
> What could be the reason. The log4cxx.xml file has following  
> configuration.
>

I believe this would occur in log4cxx 0.9.7 when logging was being  
attempted in a static constructor.  In some cases, the static  
constructor that requested the logging would be called before the  
static constructor that initialized Level::INFO and similar.

If it is occurring in the current SVN HEAD, then please let us know  
what compiler and platform that you are seeing this occur in and if  
you could provide a sample app that demonstrates the behavior even  
better.  To work around the problem, try replacing use of Level::INFO  
with Level::getInfo().