在 IBM Websphere 8.5 中通过系统变量设置 Log4j2 配置文件路径
setting Log4j2 Config file path through system variable in IBM Websphere 8.5
我正在使用 IBM Webspehere 8.5,我需要在其中从外部传递 log4j2 配置文件路径(没有硬编码在已部署的 jar 文件中,因为存在 dev、uat 和 prod 不同的配置文件)
Log4j2网站告诉https://logging.apache.org/log4j/2.0/faq.html
您也可以指定本系统配置文件的完整路径属性:
-Dlog4j.configurationFile=path/to/log4j2.xml
IBM WS站点告诉如何设置它(但它是系统属性还是环境变量)
http://www-01.ibm.com/support/docview.wss?uid=swg21254153
还有。能否请您告诉我设置 Log4j2 系统的正确方法 属性.
有关设置 JVM 系统属性的信息,请参阅知识中心的 Java virtual machine custom properties 主题:
To set custom properties, connect to the administrative console and navigate to the appropriate Java virtual machine custom properties page.
Application Server
Click Servers > Server Types, and either WebSphere application servers > server_name or WebSphere proxy servers > server_name. Then, under Server Infrastructure, click Java and process management > Process definition > Java virtual machine > Custom properties.
我正在使用 IBM Webspehere 8.5,我需要在其中从外部传递 log4j2 配置文件路径(没有硬编码在已部署的 jar 文件中,因为存在 dev、uat 和 prod 不同的配置文件)
Log4j2网站告诉https://logging.apache.org/log4j/2.0/faq.html
您也可以指定本系统配置文件的完整路径属性: -Dlog4j.configurationFile=path/to/log4j2.xml
IBM WS站点告诉如何设置它(但它是系统属性还是环境变量) http://www-01.ibm.com/support/docview.wss?uid=swg21254153
还有。能否请您告诉我设置 Log4j2 系统的正确方法 属性.
有关设置 JVM 系统属性的信息,请参阅知识中心的 Java virtual machine custom properties 主题:
To set custom properties, connect to the administrative console and navigate to the appropriate Java virtual machine custom properties page.
Application Server
Click Servers > Server Types, and either WebSphere application servers > server_name or WebSphere proxy servers > server_name. Then, under Server Infrastructure, click Java and process management > Process definition > Java virtual machine > Custom properties.