Vicky,

On 9/20/2013 4:14 AM, vicky wrote:
I need to set certain application specific enviornment variables ,pls
suggest what is the best way of doing that.
eg:- configuring enviornment variable for LOG4j file path

1. Please, don't top post.

2. I doubt log4j will read any environment variables, and Stackoverflow confirms my doubts:

http://stackoverflow.com/questions/201188/using-system-environment-variables-in-log4j-xml-configuration

3. Make sure you understand the difference:

http://stackoverflow.com/questions/7054972/java-system-properties-and-environment-variables

4. Configure log4j using Java system properties, just like Mark suggested:


Mark:
JAVA_OPTS="-Dlog4j.home=$CATALINA_BASE/logs \
            -Dderby.system.home=$CATALINA_BASE/databases"
export JAVA_OPTS

Note that both of these could (should) probably go in CATALINA_OPTS.


-Ognjen

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to