Linux – generate stderr log file in tomcat under linux

linuxlog-filestomcatwindows

Recently installed Tomcat 7 in windows machine and its running a web application.
Under 'C:\Program Files\Apache Software Foundation\Tomcat 7.0\logs', I could find couple of different log files out of which I am interested in the log file 'tomcat7-stderr.2016-11-22.log'.

We have a linux machine which generates the log in location '/var/log/tomcat' but only generates the log 'localhost_access_log.2016-11-22.txt'. How can I enable tomcat to generate the 'tomcat7-stderr.2016-11-22.log' error log?

Thank You

Best Answer

From catalina.sh script comments:

#   CATALINA_OUT    (Optional) Full path to a file where stdout and stderr
#                   will be redirected.
#                   Default is $CATALINA_BASE/logs/catalina.out

$ export CATALINA_OUT=mylog.out

then run tomcat...