0

How can I access to an environment variable named "LOGS_HOME" within my log4j.properties file. Besides, I have deployed on WebLogic 11g several wars which need the value of this E.V. in order to create a directory and place there the log files.

BTW: I am using log4j 1.2.17

czapata91
  • 51
  • 2
  • 4

1 Answers1

0

According to this answer, log4j version 2 can resolve your problem...

However, if you cannot change the log4j version, you can use the System Properties Substitution and pass the environment variable: LOGS_HOME as JAVA System Property when starting the server (example: runWebLogic.bat -Dlogs.home=%LOGS_HOME% ... NOTE: this is just an example, I really don't know how to start the weblogic server, but the idea it's the same).

Community
  • 1
  • 1
Carlitos Way
  • 3,279
  • 20
  • 30