views:

116

answers:

1

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?

A: 

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.

Spiderman
Since nobody else answered better than my workaround for the last week, will mark it as the currently best answer...
Spiderman
I came to conclusion that this answer is not satisfying. So the answer is opened again - how do I make tomcat write to file its stdout???
Spiderman