Redirect Tomcat 7 console log output to a file (Windows)

Justin Kredible picture Justin Kredible · Jul 28, 2011 · Viewed 41.2k times · Source

How do I redirect Tomcat 7 console log output to a file on Windows?

Answer

Ken Chan picture Ken Chan · Jul 28, 2011

Using catalina.bat run can start the tomcat in the current console instead of a new console , so you can redirect all the standard error and standard output stream of this command to a file using

catalina.bat run > tomcat.log 2>&1