Why file is named catalina.out?

狂风中的少年 提交于 2020-08-01 09:40:47

问题


in contrast to other logs file

catalina.out 

has different extension. I have check logging.properties and found nothing about .out. Why and where this is set? Thanks.


回答1:


Catalina.out simply contains everything that is written to Tomcat's "System.out" and "System.err".

The name "catalina.out" comes from the catalina.sh script that is conventionally used to launch Tomcat. If you want to change the name ... or do something funky with your out/err streams ... you can hack the script, or replace it with an alternative launch script.

The origin of the name "Catalina" is explained here.


I have check logging.properties and found nothing about .out.

The redirection of the standard output / error streams to catalina.out happens in the catalina.sh script.




回答2:


It seems you need to do it through your own log4j configuration and the swallowOutput property. See wiki FAQ. See also some details in this answer.

log4j is just a logging package so if you're not using it, consult you're logging package's javadoc. If you're not using any logging package - you'd better start using.



来源:https://stackoverflow.com/questions/8119745/why-file-is-named-catalina-out

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!