logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Davidson" <tim.david...@greenhatconsulting.com>
Subject properties file
Date Wed, 13 Aug 2003 09:52:24 GMT
Hi,

 since moving over to using the properties file I've been having a few problems:
 when I define the location as:

log4j.appender.myAppender.File=${CATALINA_HOME}\logs\crisp_logs.txt

 nothing seems to happen - no error log is created. When I define the location 
as:

log4j.appender.myAppender.File=${CATALINA_HOME}/logs/crisp_logs.txt

 I get the following:

log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: \logs\crisp_logs.txt (The system cannot find the path specified)
        at java.io.FileOutputStream.openAppend(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:174)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
        at org.apache.log4j.FileAppender.setFile(FileAppender.java:272)
        at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:151)

any ideas?

CATALINA_HOME has been defined.
The rest of the properties file is:
log4j.rootLogger=ALL, myAppender
log4j.appender.myAppender=org.apache.log4j.FileAppender
log4j.appender.myAppender.File=${CATALINA_HOME}\logs\crisp_logs.txt
log4j.appender.myAppender.layout=org.apache.log4j.SimpleLayout

BTW, after creating the logger, I add an info to the file to see if its working.


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


Mime
View raw message