You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Tim Davidson <ti...@greenhatconsulting.com> on 2003/08/13 11:52:24 UTC

properties file

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