log4.jar in WEB-INF/classes ? Packaged classes go in WEB-INF/lib, unless you've unpacked the log4j.jar file, in which case 'loose' class files go in the WEB-INF/classes directory.
> -----Original Message----- > From: El Toro [mailto:[EMAIL PROTECTED] > Sent: Monday, October 20, 2003 3:55 PM > To: [EMAIL PROTECTED] > Subject: more problems with log4j and tomcat > > > i'm still having a heck of a time getting log4j to > work for my webapp in tomcat...i even looked at the > mailing list archives but nothing really helped...here > is my current configuration (lots of info below): > > i have a webapp under: > > /%CATALINA_HOME%/webapps/ReportEngine > - This directory basically contains a set of pretty > simple jsp's which execute methods from a custom > data layer. > /%CATALINA_HOME%/webapps/ReportEngine/WEB-INF/classes > - my log4j.properties file lives here > /%CATALINA_HOME%/webapps/ReportEngine/WEB-INF/classes > - my log4j jar as well as the jar containing the > custom data layer lives here. I am using log4j > 1.2.7. the log4j jar does not appear anywhere > else in my classpath. > > Here is my log4j.properties: > > log4j.rootLogger=DEBUG, reporting > log4i.debug=true > log4j.appender.reporting=org.apache.log4j.RollingFileAppender > log4j.appender.reporting.File={$CATALINA_HOME}/logs/reporting.log > log4j.appender.reporting.ImmediateFlush=true > log4j.appender.reporting.Threshold=DEBUG > log4j.appender.reporting.DatePattern='.'yyyy-MM-dd > log4j.appender.reporting.layout=org.apache.log4j.PatternLayout > log4j.appender.reporting.layout.ConversionPattern=%d > [%t] %-5p %F:%L - %m%n > > I don't see the file 'reporting.log' being created > ANYWHERE locally. I also don't see any log4j output > in any of the logs under /$CATALINA-HOME$/logs or > under the console. > > There is a connection factory contained in the data > layer jar mentioned above. I know there is an > exception being thrown somewhere in there (b/c i'm not > receiving a connection)..probably due to a > configuration error in the database connection pool. > Upon exception it should log a fatal error using > log4j. Here is how I am doing the logging in the > connection factory: > > first i define a member var in the connection factory > of type org.apache.log4j.Logger: > > // private member var > private final static Logger logger = > Logger.getLogger(DBConnectionFactory.class); > > when i encounter an excetion I log a fatal error: > > logger.fatal("Naming exception encountered when > looking up datasource : " + ex.getMessage()); > > I've used the above method of using log4j for ejb > development with JBoss...so I don't think its the way > i'm calling/using log4j...rather a configuration > issue? > > I've hit a brick wall here...i don't know what else to > do. I've mismatched the jndi names so that the naming > exception being caught above should ALWAYS be thrown > b/c the jndi name i'm looking up doesn't exist. > Anyone have any ideas as to what is wrong? > > This is on a windows xp platform and i'm running > tomcat 4.1.2. > > Any help would be greatly appreciated...thanks! > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > > --------------------------------------------------------------------- > 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]
