logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Stauffer" <stauffer.ja...@gmail.com>
Subject Re: RollingFileAppender problem
Date Wed, 06 Dec 2006 22:37:50 GMT
Do you get logs to the console?  Try removing the filters on the
appender to see if that helps.

On 12/6/06, garima015 <garima_indiya@rediffmail.com> wrote:
>
> I am using RollingFileAppender to log the loggers in File .File is getting
> created at the place but nothing is coming in that File .Can somebody please
> tell me wht is the problem in code'
> Here is the code i have written in LOg4j.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="CONSOLE.OUT" class="org.apache.log4j.ConsoleAppender">
>         <param name="target" value="System.out"/>
>         <layout class="org.apache.log4j.PatternLayout">
>             <param name="ConversionPattern" value="%d{HH:mm:ss.SSS} (%6r)
> %-5p [%-7t] %F:%L %x - %m%n"/>
>         </layout>
>         <filter class="org.apache.log4j.varia.LevelRangeFilter">
>             <param name="LevelMin" value="debug"/>
>             <param name="LevelMax" value="fatal"/>
>             <param name="AcceptOnMatch" value="false"/>
>         </filter>
>         <filter class="com.wu.log4j.common.filter.TraceDenyFilter">
>             <param name="timeValue" value="600"/>
>         </filter>
>     </appender>
> <appender name="R" class="org.apache.log4j.RollingFileAppender">
>     <param name="file" value="C:/P4Workspace/logs/example.log"/>
>     <param name="MaxFileSize" value="100KB"/>
>     <param name="MaxBackupIndex" value="1"/>
>     <layout class="org.apache.log4j.PatternLayout">
>             <param name="ConversionPattern" value="%d{HH:mm:ss.SSS} (%6r)
> %-5p [%-7t] %F:%L %x - %m%n"/>
>     </layout>
>     <filter class="org.apache.log4j.varia.LevelRangeFilter">
>             <param name="LevelMin" value="debug"/>
>             <param name="LevelMax" value="fatal"/>
>             <param name="AcceptOnMatch" value="false"/>
>     </filter>
>     <filter class="com.wu.log4j.common.filter.TraceDenyFilter">
>       <param name="timeValue" value="600"/>
>     </filter>
>     </appender>
>
>    <root>
>     <priority value ="debug" />
>     <appender-ref ref="CONSOLE.OUT" />
>     <appender-ref ref="R" />
>   </root>
> </log4j:configuration>
>
>
> Thanks
>
>
> --
> View this message in context: http://www.nabble.com/RollingFileAppender-problem-tf2771044.html#a7729127
> Sent from the Log4j - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>


-- 
James Stauffer        http://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

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