You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Steve Cohen <St...@ignitesports.com> on 2002/05/02 20:39:39 UTC

FW: xml configuration question

I posted this question to the Log4j list, but the more I think about it, I think the 
problem is more likely to have something to do with the the commons-logging wrapper I've placed around log4j being incorrect.  The actual log call that is provoking these
errors is through a commons-logging log call.  Anyone on this side of the fence have any ideas?

-----------------------------------------------------------------
Steve Cohen
Sr. Software Engineer
Ignite Sports, Inc.
stevec@ignitesports.com


-----Original Message-----
From: Steve Cohen 
Sent: Thursday, May 02, 2002 1:26 PM
To: Log4J Users List
Subject: xml configuration question


Probably dumb, but I can't figure it out.

Here's my configuration: 

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" >
   <appender name="applog" class="org.apache.log4j.DailyRollingFileAppender">
      <layout class="org.apache.log4j.PatternLayout">
        <param name="ConversionPattern" value="%d{DATE} %p %t %c - %m%n"/>
        <param name="File" value="AutoPublish.log" />
        <param name="DatePattern" value="'.'yyyy-MM-dd'.log'"/>
      </layout>
   </appender>
   <root>
      <priority value="debug"/>
      <appender-ref ref="applog" />
   </root>
</log4j:configuration>

This is stored in a file named log4jcfg.xml.

When I attempt to log against this, I get the following error messages:

log4j:WARN No appenders could be found for logger (com.ignitesports.autopublish).
log4j:WARN Please initialize the log4j system properly.

The fact that I am getting log4j errors indicates to me that there are no more issues about finding classes needed and that logging has been initialized.

The troubleshooting guide says this about this error:

Log4j does not have a default logging target.  It is the user's responsibility to ensure that all categories can inherit an appender. This can be easily achieved by attaching an appender to the root category.

Haven't I attached the "applog" appender to the root in the above config script?



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>