Re: How do I attach an appender in Tomcat
Jacob Kjome <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <[email protected]> |
You must have log4j.jar in CATALINA_HOME/common/lib or elsewhere in the
classpath where Tomcat can see it. commons-logging uses log4j
preferentially if it finds it in the environment. Try adding something
like this log4j.xml to common/classes...
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
debug="false" threshold="debug">
<appender name="A1" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%-4r [%t] %-5p %c %x -
%m%n"/>
</layout>
</appender>
<root>
<level value="info"/>
<appender-ref ref="A1"/>
</root>
</log4j:configuration>
I assume Barracuda application logging works for you after you see this
message, right?
BTW, you should become a list member before posting, otherwise your posts
have to wait for an admin to approve them.
Jake
At 04:56 PM 11/7/2003 -0500, Jack Marcus wrote:
>Hi I am running Tomcat 4.1.24, and when I attempt to start it, i get an
>error indicating that the log4j file is not properly setup and there are
>no appenders, therefore Tomcat does not start.
>Any ideas what could be wrong
>
>
>Jack Marcus
>System Engineer
>Mobius Management Systems, Inc.
>Office: (905) 889-3984
>Cell: (416) 464-0020
>Fax: (905) 731-2944
>Email: [email protected]
>
>Managing ALL the Content That Enables E-business
>
>
>