[英]liberty profile configuration issue (log4j2)
I can successfully set up log4j logging by setting up the following line within my jvm.options file: 通过在jvm.options文件中设置以下行,我可以成功设置log4j日志记录:
-Dlog4j.configurationFile=C:/eclipse/runtime/usr/servers/tmpServer/log4j2.xml
However, I want to change this, so the path is not hard coded. 但是,我想更改此路径,因此路径不是硬编码的。
I was hoping this would work: 我希望这可以工作:
-Dlog4j.configurationFile=${server.config.dir}/log4j2.xml
But it does not. 但事实并非如此。 Any ideas why not? 任何想法为什么不呢?
I'm using liberty profile, and my log4j2.xml file is in the same directory as the jvm.options file. 我正在使用自由配置文件,并且我的log4j2.xml文件与jvm.options文件位于同一目录中。
jvm.options
不支持Shell和变量扩展-检查此页面定制Liberty配置文件环境 -但是server.config.dir
是默认的工作目录,因此设置: -Dlog4j.configurationFile=./log4j2.xml
应该可以工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.