struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ashokd" <ash...@visualsoft-tech.com>
Subject Multiple Log Files Configuration Doubt
Date Tue, 26 Mar 2002 15:45:57 GMT
Hi,

My Requirement is: I need to capture the logs into two different log files.

For the above requirement I got a sample xml file, I configured that.

I have a doubt regarding the configuration of the xml file.

In below xml file I have two appenders, one is dubug another is normal.

My doubt is when the logs will go into debug and when the logs will go into normal(according
to below configuration).

Code of the XML file(Log4j.xml) is :

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

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

 <appender name="debug" class="org.apache.log4j.DailyRollingFileAppender">
  <param name="File" value="C:\\debug.log"/>
  <param name="DatePattern" value=".yyyy-ww"/>
  <layout class="org.apache.log4j.PatternLayout">
         <param name="ConversionPattern" 
                            value="%4d{HH:mm:ss,SSS} %-5p [%t] - %c: %m%n"/>
  </layout>
 </appender>

 <appender name="normal" class="org.apache.log4j.DailyRollingFileAppender">
  <param name="File" value="C:\\server.log"/>
  <param name="DatePattern" value=".yyyy-ww"/>
  <param name="BufferedIO" value="true"/>
  <param name="BufferSize" value="4096"/>
  <layout class="org.apache.log4j.PatternLayout">
     <param name="ConversionPattern" value="%4d{dd MMM yyyy HH:mm:ss} %-5p [%t] - %c: %m%n"/>
  </layout>
  <filter class="org.apache.log4j.varia.LevelRangeFilter">
   <param name="LevelMin" value="INFO" />
  </filter>
 </appender>

 <root>
  <priority value="debug"/>
  <appender-ref ref="debug"/>
  <appender-ref ref="normal"/>
 </root>
</log4j:configuration>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message