I tried using the simplest XML file config copied from the Log4j1.1.3 docs,
I just change the category name for my application:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>
<appender name="STDOUT" class="org.apache.log4j.FileAppender">
<param name="File" value="System.out" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/>
</layout>
</appender>
<category name="edu.rmit.isys2049.EmployeeAccessBean">
<priority value="debug" />
</category>
<root>
<priority value ="debug" />
<appender-ref ref="STDOUT" />
</root>
</log4j:configuration>
BUT encountered this problem when I start Tomcat:
log4j: [log4j.properties] does not exist.
log4j: Trying to find [log4j.properties] using WebappClassLoader
available:
delegate: false
repositories:
/WEB-INF/classes/
required:
----------> Parent Classloader:
StandardClassLoader
available:
delegate: true
repositories:
file:C:\jakarta-tomcat-4.0.1\classes\
file:C:\jakarta-tomcat-4.0.1\lib\jasper-runtime.jar
file:C:\jakarta-tomcat-4.0.1\lib\naming-factory.jar
file:C:\jakarta-tomcat-4.0.1\lib\jasper-compiler.jar
required:
----------> Parent Classloader:
StandardClassLoader
available:
Extension[javax.mail, implementationVendor=Sun Microsystems, Inc.,
implement
ationVendorId=com.sun, implementationVersion=1.2,
specificationVendor=Sun Micros
ystems, Inc., specificationVersion=1.2]
delegate: true
repositories:
file:C:\jakarta-tomcat-4.0.1\common\classes\
file:C:\jakarta-tomcat-4.0.1\common\lib\naming-resources.jar
file:C:\jakarta-tomcat-4.0.1\common\lib\jta.jar
file:C:\jakarta-tomcat-4.0.1\common\lib\jdbc2_0-stdext.jar
file:C:\jakarta-tomcat-4.0.1\common\lib\servlet.jar
file:C:\jakarta-tomcat-4.0.1\common\lib\tyrex-0.9.7.0.jar
file:C:\jakarta-tomcat-4.0.1\common\lib\activation.jar
file:C:\jakarta-tomcat-4.0.1\common\lib\naming-common.jar
file:C:\jakarta-tomcat-4.0.1\common\lib\xerces.jar
file:C:\jakarta-tomcat-4.0.1\common\lib\mail.jar
file:C:\jakarta-tomcat-4.0.1\common\lib\hsqldb.jar
file:C:\jakarta-tomcat-4.0.1\common\lib\jnp-client.jar
file:C:\jakarta-tomcat-4.0.1\common\lib\log4j.jar
required:
----------> Parent Classloader:
[EMAIL PROTECTED]
class loader.
log4j: Trying to find [log4j.properties] using
ClassLoader.getSystemResource().
log4j: Could not find resource: [log4j.properties].
Starting service Tomcat-Apache
Apache Tomcat/4.0.1
----- Original Message -----
From: "Ferenc Toth" <[EMAIL PROTECTED]>
To: "Log4J Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, 05 March, 2003 9:03 PM
Subject: RE: Multiple appenders with differing levels?
> You can't (rtfm :). Don't worry much about the XML config file it's
> _really_ simple and straight forward.
>
> On Mon, 3 Mar 2003 14:01:16 +0100, Hazejager, S. - SPLXE wrote:
>
> >Thanks. Does anyone know how to configure filters if using a
> >log4j.properties file instead of an XML file?
> >
> >Sven
> >
> >-----Original Message-----
> >From: Ferenc Toth [mailto:[EMAIL PROTECTED]
> >Sent: Monday, March 03, 2003 12:11 PM
> >To: Log4J Users List
> >Subject: RE: Multiple appenders with differing levels?
> >
> >
> >Use attached example as a starting point. "debug" gets all logs, while
> >"normal" gets only INFO and higher. Refer to the javadoc of the filters
> >for more information. But for your problem you don't need any more
> >complex solution.
> >
> >
> >**********************************************************************
> >For information, services and offers, please visit our web site:
http://www.klm.com. This e-mail and any attachment may contain confidential
and privileged material intended for the addressee only. If you are not the
addressee, you are notified that no part of the e-mail or any attachment may
be disclosed, copied or distributed, and that any other action related to
this e-mail or attachment is strictly prohibited, and may be unlawful. If
you have received this e-mail by error, please notify the sender immediately
by return e-mail, and delete this message. Koninklijke Luchtvaart
Maatschappij NV (KLM), its subsidiaries and/or its employees shall not be
liable for the incorrect or incomplete transmission of this e-mail or any
attachments, nor responsible for any delay in receipt.
> >**********************************************************************
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
__________________________________________________
Do You Yahoo!?
Promote your business from just $5 a month!
http://sg.biztools.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]