log4j如何通过文件传入配置

The solution is using of the following JVM argument:

If the file is NOT in the classpath (in WEB-INF/classes in case of Tomcat) but somewhere on you disk, use file:, like

More information and examples here: http://logging.apache.org/log4j/1.2/manual.html

Leave a Reply

Your email address will not be published.