您能不能建议我默认情况下如何更改tomcat日志文件的位置,所有日志文件都在tomcat / logs中可用,有什么办法可以完全更改此位置。
答案 0 :(得分:0)
Tomcat日志
1)tomcat / conf / logging.properties
1catalina.org.apache.juli.AsyncFileHandler.directory = $ {catalina.base} / logs(was) 1catalina.org.apache.juli.AsyncFileHandler.directory = / home / user / logs
2localhost.org.apache.juli.AsyncFileHandler.directory = $ {catalina.base} / logs(是) 2localhost.org.apache.juli.AsyncFileHandler.directory = / home / user / logs
3manager.org.apache.juli.AsyncFileHandler.directory = $ {catalina.base} / logs(是) 3manager.org.apache.juli.AsyncFileHandler.directory = / home / user / logs
4host-manager.org.apache.juli.AsyncFileHandler.directory = / home / user / logs(是) 4host-manager.org.apache.juli.AsyncFileHandler.directory = $ {catalina.base} / logs
2)Server.xml更改localhost.log
是
3)Catalina.sh更改catalina.out日志
CATALINA_OUT =“ $ CATALINA_BASE” /logs/catalina.out是
CATALINA_OUT = / home / user / logs / catalina.out
注意:在编辑文件之前,请备份所有3个文件并进行修改,修改文件后,请启动tomcat以反映所做的更改,谢谢