将Tomcat的控制台输出重定向到文件中

在startup.bat中,把原来

call "%EXECUTABLE%" start %CMD_LINE_ARGS%

替换成

call "%EXECUTABLE%" run %CMD_LINE_ARGS%  > D:\Tomcat\logs\console.log

副作用是:

   1.控制台看不到了

   2.catalina.bat和startup.bat在同一个DOS窗口中运行

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.