logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam K" <ada...@gmail.com>
Subject Re: Log4J +struts
Date Thu, 14 Dec 2006 21:54:38 GMT
See the "Default Initialization Procedure" section at
http://logging.apache.org/log4j/docs/manual.html

I have looked at this, but am now more confused than previously.  (Part of
the problem is that I tried to use parts for that page which obviously
resulted in disaster.

I was looking around and found the following:
http://mail-archives.apache.org/mod_mbox/logging-log4j-user/200207.mbox/%3C8426231879.20020717150829@visi.com%3E

and would like to clarify the steps that I should be following (thanks for
your patience with me on this one).

1) add log4j.jar to WEB-INF/lib/    -- COMPLETE
2) create a log4jConfiguration.xml file and place it in /WEB-INF/src/java/
------COMPLETE When compiled the file is appearing under /WEB-INF/classes

 The following is the xml file

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
  <appender name="console" class="org.apache.log4j.ConsoleAppender">
    <param name="Target" value="System.out"/>
    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%-5p %c{1} - %m%n"/>
    </layout>
  </appender>

  <root>
    <priority value ="debug" />
    <appender-ref ref="console" />
  </root>

</log4j:configuration>

At this point I am wondering if I should be doing something similar to what
is mentioned in the e-mail archive that I borrowed.  Again if you can advise
me I would really appreciate it.

thanks again for your time and effort.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message