开发者

Write Tomcat 5.5 output to one of Tomcat's log files

I'd like that all the output that is shown in Tomcat's console will be saved into a file including the 开发者_运维问答output on startup and shutdown of Tomcat.

How can I do this?

I looked at apache documentation about logging, Do I need to change something in the logging.properties can I trust log4j to write message from the first message on startup to the last message on shutdown?


Temporary workaround that I found is to change catalina.bat
from set _EXECJAVA=start "Tomcat" %_RUNJAVA%
to set _EXECJAVA=%_RUNJAVA%
so running tomcat will not open new console but use the same one and when I suspend tomcat (ctrl c) It will not close the console so I could keep read the output.


If you're in Solaris or similar try:

  • nohup /path/to/tomcat/bin/startup.sh &

That'll write everything from the start to a file called nohup.out in the folder where you issued the command.

Don't know if that suites you thou.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜