Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用 bin 中的启动命令启动 tomcat。如何将 println 记录到 stdout 并将错误记录到 stderr 而不是控制台?要修改哪个文件以及如何修改?我正在使用 Windows Server 2008。
如果你运行bin/startup.bat,那么 Tomcat 应该在后台启动并且 stdout/stderr 应该被重定向到logs/catalina.out. 相反,如果您运行bin/catalina.sh run(注意附加的命令行参数“run”),那么 Tomcat 应该在控制台中运行并且所有的 stdout/stderr 都应该在那里显示。
bin/startup.bat
logs/catalina.out
bin/catalina.sh run