将 Tomcat 7 控制台日志输出重定向到文件 (Windows)

问题描述:

如何将 Tomcat 7 控制台日志输出重定向到 Windows 上的文件?

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

使用 catalina.bat run 可以在当前控制台启动 tomcat 而不是新的控制台,这样就可以重定向所有标准使用

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