[英]Override log4j.properties from within the log4j.properties
Is it possible to state something like - "override file = /log4j.properties" 是否可以声明类似的内容-“ override file = /log4j.properties”
From within the log4j.properties and to link to the actual log4j config? 从log4j.properties内部并链接到实际的log4j配置?
Thanks! 谢谢!
It is not possible. 这不可能。 However, you can configure the system property
log4j.configuration
specifying the path of a configuration file. 但是,您可以配置系统属性
log4j.configuration
指定配置文件的路径。 Add the following parameter when you create the JVM: 创建JVM时添加以下参数:
java -Dlog4j.configuration=path/to/log4j-test.properties AwesomeApp
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.