问题
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
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?
回答1:
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.
来源:https://stackoverflow.com/questions/26365646/console-log-not-goes-to-tomcat-logcatalina-start-security-tomcat-log