tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <funk...@joedog.org>
Subject Re: log4j problem
Date Tue, 13 May 2003 12:41:40 GMT
While I don't know your solution, I was fiddling with log4j yesterday and 
noticed log4j will spew warning messages to standard output when it 
encounters problems while reading the log4j.properties.

Standard output might have some hidden gem.

Otherwise - are you running any security managers in java? It might not be 
letting you write to /tmp.

-Tim

harm@informatiefabriek.nl wrote:
> 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