log4j configuration via JVM argument(s)?

2019-01-04 16:40发布

What variables do I have to set/pass as arguments to the JVM to get log4j to run properly? And by properly I mean not complain and print to the console. Can I see a typical example?

Note: I need to avoid creating a log4j.properties file in the application.

7条回答
地球回转人心会变
2楼-- · 2019-01-04 17:33

Generally, as long as your log4j.properties file is on the classpath, Log4j should just automatically pick it up at JVM startup.

查看更多
登录 后发表回答