logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Kalany" <m.kal...@gmx.at>
Subject Thread org.apache.log4j.xml.XMLWatchdog
Date Mon, 18 Aug 2008 11:35:56 GMT
Hi folks,

When I use the profiling tool off the Netbeans 6.1 IDE, I see lots of Threads that got the
name "org.apache.log4j.xml.XMLWatchdog". Unfortunately I didn't find much documentation about
that, that's why I'm posting here.

My problem is that there's lot's of threads (about 5 per instance of B) with this name when
I profile code that looks like the code below. Why is that? Does log4j really need them? The
profiler says they are waiting all the time. 

Regards,
Martin

java-code:

class A{
DOMConfigurator.configure("log4j_config.xml");
Logger loggerA = Logger.getLogger("loggerA");
B b1 = new B();
B b2 = new B();
B b3 = new B();

}

class B{
Logger loggerB = Logger.getLogger("loggerB");
}

log4j_config.xml:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
      
  <appender name="drfa" class="org.apache.log4j.RollingFileAppender">
    <param name="File" value="C:\\Root.log"/>
    <param name="Append" value="true"/>
	<param name="MaxFileSize" value="100KB"></param>
	<param name="MaxBackupIndex" value="5"></param>
    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d{dd/MMM/yyyy HH:mm:ss,SSSS} [%t] - %p -
%m%n"/>
    </layout>
  </appender>
  
  <appender name="rfa_a" class="org.apache.log4j.RollingFileAppender">
    <param name="File" value="C:\\A.log"/>
    <param name="Append" value="true"/>
	<param name="MaxFileSize" value="200KB"></param>
	<param name="MaxBackupIndex" value="10"></param>
    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d{dd/MMM/yyyy HH:mm:ss,SSSS} [%t] - %p -
%m%n"/>
    </layout>
  </appender>
  
   <appender name="rfa_b" class="org.apache.log4j.RollingFileAppender">
    <param name="File" value="C:\\B.log"/>
    <param name="Append" value="true"/>
	<param name="MaxFileSize" value="200KB"></param>
	<param name="MaxBackupIndex" value="10"></param>
    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d{dd/MMM/yyyy HH:mm:ss,SSSS} [%t] - %p -
%m%n"/>
    </layout>
  </appender>
     
  
  <logger name="loggerA" additivity="false">
	<level value ="all" />
    <appender-ref ref="rfa_a"/>
  </logger>
  
  <logger name="loggerB" additivity="false">
	<level value ="all" />
    <appender-ref ref="rfa_b"/>
  </logger>
  
  <root>
    <priority value ="info"/>
    <appender-ref ref="drfa"/>
  </root>

</log4j:configuration>
-- 
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/wasistshortview.php?mc=sv_ext_mf@gmx

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message