logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Billy W. Talton" <Billy.W.Tal...@supervalu.com>
Subject log4j...help.
Date Thu, 02 Mar 2006 22:18:54 GMT

I haven't used log4j a whole lot.  Having noticed that logging in not 
particularly a strongsuit in the applications at my job, I decided that I 
would implement this industry-standard in my next project.  I downloaded 
the latest version, installed and configured it rather easily and I was 
off and running.. i thought.  I've been stumped by this one problem... 
I've been going nuts trying to figure out how to output to a 
file/directory in my web application.  I'm able to go to database and 
console just fine.  A few other Appenders worked as well.   As I've found, 
 log4j prints directly to my WSAD root install directory.  This is a 
problem for me since I share a server with other teams and applications. I 
could create a NAS share but that creates portability issues.  This has to 
be simple but I'm Googlestumped.  Here's my log file.  Any ideas?


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
        <appender name="USER_LOG" class="org.apache.log4j.ConsoleAppender"
                <param name="Threshold" value="debug" />
                <layout class="org.apache.log4j.PatternLayout">
                        <param name="ConversionPattern" value="%-5p %c{2} 
- %m\n" />
        <appender name="PERF_LOG" class="org.apache.log4j.FileAppender">
                <param name="File" value="perf.log" />
                <param name="Threshold" value="info" />
                <layout class="org.apache.log4j.PatternLayout">
                        <param name="ConversionPattern" value="%-5p %c{2} 
- %m\n" />
        <appender name="ROLE_LOG" class=
                <param name="File" value="es_edi.log" />
                <param name="MaxBackupIndex" value="10" />
                <param name="MaxFileSize" value="1000KB" />
                <param name="Threshold" value="debug" />
                <layout class="org.apache.log4j.PatternLayout">
                        <param name="ConversionPattern" value="[%d] %t %c 
%-5p - %m%n" />

        <logger name="com.xxx.xxx">
                <level value="DEBUG" />
                <appender-ref ref="PERF_LOG" />
                <appender-ref ref="USER_LOG" />
                <appender-ref ref="ROLE_LOG" />

                <priority value="debug" />
                <appender-ref ref="USER_LOG" />
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message