像这样:log4j.appender.file.File=/var/tomcat/${webApp.root}/log.log
log4j支持环境变量的,在应用内打印一下,看看有哪些变量可用
@wendal 怎么打印,不懂
http://stackoverflow.com/questions/22296275/how-to-use-system-environment-variables-in-log4j-properties
for (Entry<String, String> en : System.getenv().entrySet()) { System.out.println(en.getKey()+"="+en.getValue()); };