How do I redirect Tomcat 7 console log output to a file on Windows?
How do I redirect Tomcat 7 console log output to a file on Windows?
File: catalina.bat (in the Tomcat's root \bin directory)
Lines:
rem Comment out the line below
rem set _EXECJAVA=start "%TITLE%" %_RUNJAVA%
rem Add the line below instead
set _EXECJAVA=%_RUNJAVA%
Next, find the line making the final Java call (add the redirection as below):
%_EXECJAVA% %CATALINA_LOGGING_CONFIG% %LOGGING_MANAGER% ... 2>&1 >c:\temp\tomcat.log
You will then get your stdout and stderr streams in the file c:\temp\tomcat.log