users@glassfish.java.net

log4j - how to change the location of the log file?

From: <glassfish_at_javadesktop.org>
Date: Sun, 13 Sep 2009 23:35:29 PDT

Hi, I have the following line in my log4j.properties file:

log4j.appender.logfile.File=MyApplication.log

My log file appears in MyDomain/config directory, but I would like it to land in the MyDomain/logs directory. How can I achieve that? I am not allowed to modify the startserv script. With tomcat, I could write

log4j.appender.logfile.File=${catalina.home}/logs/MyApplication.log

is there something similar for GlassFish?

Thanks in advance for your help!
[Message sent by forum member 'morwen' (e.jarecka_at_yahoo.com)]

http://forums.java.net/jive/thread.jspa?messageID=363854