jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pedro Nevado" <pnev...@javato.com>
Subject RE: How to turn on logging?
Date Sat, 17 Sep 2005 09:37:50 GMT
I think the problem is that you have not an appender-ref entry in your
configuration. See below.
Regards,
Pedro Nevado

<!-- File appender -->
    <appender name="FILE_LOG" class="org.apache.log4j.FileAppender">
        <param name="File"
            value="C:/my_logs_dir/log4j_cactus.txt"/>
        <param name="Append" value="false"/>
        <param name="Threshold" value="DEBUG"/>
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="my_pattern"/>
        </layout>
    </appender>
<!--Logger for Cactus.-->
<logger name="org.apache.cactus">
        <level value="debug"/>
        <appender-ref ref="FILE_LOG"/>
</logger>

-----Mensaje original-----
De: Phlip [mailto:phlip2005@gmail.com]
Enviado el: sábado, 17 de septiembre de 2005 8:29
Para: Cactus Users List
Asunto: Re: How to turn on logging?


Pedro Nevado wrote:

> In my development environment, in src/ I have a log4j.xml file with the
> entry
>
> <logger name="org.apache.cactus">
>        <level value="debug"/>
>        <appender-ref ref="FILE_LOG"/>
> </logger>

Muchismas gracias! Now...

log4j:WARN No appenders could be found for logger
(org.apache.cactus.internal.configuration.ConfigurationInitializer).

My entire, dirt-simple log4j.xml file is this:

<?xml version='1.0' encoding='ISO-8859-1' ?>
<!DOCTYPE log4j:configuration SYSTEM "file:./log4j.dtd">

<log4j:configuration>
  <appender name="FILE_LOG" class="org.apache.log4j.RollingFileAppender">
    <param name="MaxFileSize" value="1Mb"/>
    <param name="MaxBackupIndex" value="3"/>
    <param name="file" value="cactus.log"/>
    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d [%7r] %6p - %30.30c - %m
\n\r\n\r"/>
    </layout>
  </appender>

<logger name="org.apache.cactus">
        <level value="debug"/>
 </logger>

  <root>
    <priority value="INFO"/>
  </root>
</log4j:configuration>

What's wrong with it? (And was there a real reason the error message
couldn't be more specific??)

--
  Phlip
  http://www.greencheese.org/ZeekLand  <-- NOT a blog!!


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




Mime
View raw message