log4j file appender 的根路径 若没有指定,那就是 ${user.dir}

有这样一个配置:

   log4j.appender.fileAppender.File=theLog.log

问题:那么这个 theLog.log的绝对路径是什么呢?

答曰:${user.dir}/theLog.log

      若当前运行的JAVA程序是tomcat应用,那它就是 ${catalina_home/bin/theLog.log

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.