logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Farrell, Timothy" <Timothy.Farr...@Compuware.com>
Subject RE: how do i get Log4j in Tomcat environment?
Date Fri, 08 Aug 2003 13:38:51 GMT
Can anyone see anything wrong with this log4j.xml file?  For some reason I
cannot get lof4j to initialize and it's driving me crazy.  I am sure it is
something I am doing wrong but I can't seem to locate the problem.

The error message I am getting is:

No appenders could be found for logger.  Please initialize the log4j system
properly .

Here is the log4j file:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<!-- For Ant build -->
<log4j:configuration>
<!-- order of elements: renderer*, appender*, (category | ...) , root -->

    <appender name="LF5" class="org.apache.log4j.lf5.LF5Appender">
        <param name="MaxNumberOfRecords" value="1000"/> 
    </appender>
  
    <appender name="file" class="org.apache.log4j.RollingFileAppender">
        <param name="file" value="build.log"/>
        <param name="maxBackupIndex" value="3"/>
        <param name="maxFileSize" value="100KB"/>
        <layout class="org.apache.log4j.TTCCLayout"/>
    </appender>

    <!-- if using this in ant, be sure the java mail libraries are avaiable
--> 
    <appender name="mail" class="org.apache.log4j.net.SMTPAppender">
        <param name="Threshold" value="debug"/>
        <param name="SMTPHost" value="bh1.compuware.com"/>
        <param name="bufferSize" value="1"/>
        <param name="to" value="timothy.farrell@compuware.com"/>
        <param name="from" value="timothy.farrell@compuware.com"/>
        <param name="subject" value="Ant test"/>
        <layout class="org.apache.log4j.HTMLLayout"/>
    </appender>
  
	<appender name="STDOUT" class="org.apache.log4j.ConsoleAppender">
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="[%t] %C{2} (%F:%L) -
%m%n"/>
        </layout>
	</appender>
    
	<root>
	    <priority value="debug" />
   	    <appender-ref ref="STDOUT" />
        <appender-ref ref="file"/>
   <!--     <appender-ref ref="mail"/> -->
   <!--     <appender-ref ref="LF5"/> -->
	</root>
    
</log4j:configuration>

Thank you for your help.



The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it. 


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


Mime
View raw message