控制台日志不会转到tomcat.log(catalina start -security> tomcat.log) [英] console log not goes to tomcat.log(catalina start -security > tomcat.log)
问题描述
我在雄猫中使用安全管理器. 我需要将所有consol日志都写入tomcat.log文件中. 这个IM使用这个命令
Im using security manager in my tomcat. I need all the consol logs to be written in the tomcat.log file. Fo this im using this cmd
catalina start -security > tomcat.log
但是日志不会进入tomcat.log,而是再次仅在控制台中编写.
But the log not goes to tomcat.log rather it is again writing in console only.
如何将此日志写入单独的文件中?
How can i write this log into a separate file?
推荐答案
签出catalina.out文件.默认情况下,日志重定向到$ CATALINA_BASE/logs/catalina.out文件.要覆盖默认配置,可以在setenv.sh中设置Tomcat环境变量 CATALINA_OUT ,这是将stdout和stderr重定向到的文件的完整路径.
Check out your catalina.out file. By default logs are redirected to $CATALINA_BASE/logs/catalina.out file. To override default configuration ,you can set Tomcat environment variables CATALINA_OUT in setenv.sh which is full path to the file where stdout and stderr will be redirected.
这篇关于控制台日志不会转到tomcat.log(catalina start -security> tomcat.log)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!