logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tankb...@aol.com
Subject need helping configuring log4j micro edition for Tomcat 4....
Date Wed, 12 Dec 2001 16:25:43 GMT
hello all, 

i'm new to log4j (i'm using log4j micro edition) and i've waded through the log4j manual,
the FAQ, the troubleshooting page, and the archives for this list.  unfortunately, i still
can't get log4j working properly. doh!  i've tried using the default initialization, ie putting
the log4j.properties file in the WEB-INF/classes directory of my webapp, but to no avail.
 i saw in one post that stated it was necessary to set the TOMCAT_OPTS, is that really true?
 how do i set a different configuration file for each web application then?

this is the log code i put in my DbUser class:

package com.coolservlets.forum.database;
import org.apache.log4j.Category; 

public class DbUser implements User, Cacheable {
    // logging variable
    static Category log = 

    private void loadFromDb() throws UserNotFoundException {
        log.fatal("loadFromDb(): uid=" + uid);
        log.debug("loadFromDb(): numericId=" + numericId);

  here is my log4j.properties file in case there's an error in it --

log4j.rootCategory=DEBUG, R


log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n

# Print messages with a priority of DEBUG or higher in the package com.oceangroup

thanks, joy

To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>

View raw message