tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@informatiefabriek.nl
Subject log4j problem
Date Tue, 13 May 2003 12:23:46 GMT
Hi all,

I'm trying to use the log4j package in my web appliction.
I copied log4j.properties into my WEB-INF/classes dir. This file contains:

log4j.rootLogger=debug, stdout, R

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n

log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=/tmp/blah.log

log4j.appender.R.MaxFileSize=100KB
# Keep one backup file
log4j.appender.R.MaxBackupIndex=1

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

In my (struts) ActionClass I call:

// ... other code ...
Logger log = Logger.getLogger(SendMailAction.class);
log.info("Test message");

In my Tomcat console I see this message nicely printed:

14:08:03,472 INFO  [SendMailAction] Test message

But, the log file /tmp/blah.log does not get created!

I have tried a lot of things. My file-permissions are okay. (I even made 
/tmp chmod 777).
This does not make any difference.

Can somebody please tell what is wrong here. I'm realy stuck at this!

Thanks a million,

Harm de Laat
Informatiefabriek
The Netherlands



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message