简体   繁体   中英

How to change the log4j2 properties

在testng框架支持的unix环境中运行我的测试用例时,我想通过命令行更改log4j2属性文件的日志级别。有什么办法可以做到这一点?

You can use JVM property log4j.configuration to specify custom log4j configuration file, eg:

java -jar .... -Dlog4j.configuration=/home/log4j.properties  

That file should contains specific setting for Unit tests

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM