struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ashokd" <>
Subject Fw: Multiple Log Files Configuration Doubt
Date Tue, 26 Mar 2002 15:48:05 GMT

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="">

 <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"/>

 <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"/>
  <filter class="org.apache.log4j.varia.LevelRangeFilter">
   <param name="LevelMin" value="INFO" />

  <priority value="debug"/>
  <appender-ref ref="debug"/>
  <appender-ref ref="normal"/>

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message