I have a tomcat on a linux machine and I can visualize the "catalina.out" file.
I wanted to migrate my development environment (Eclipse IDE, JDK 6, Tomcat 6, etc.) from linux to windows.
Everything is ok but, I cannot find the "catalina.out" on my windows tomcat !
I read this post but the solution is not suitable for the eclipse IDE (as i'm launching tomcat from eclipse).
How can I generate the "catalina.out" file in windows ?
Thank you
catalina.out and other CATALINA_HOME/logs/*.log files are completely different logs.
All CATALINA_HOME/logs/catalina*.log files belongs to Tomcat server. If you don't use Tomcat's JULI you won't find them really useful.
catalina.out is just a redirected output from running server. If your app is logging on console (e.g. by using ConsoleAppender in log4j) you will find your logs there.
Problem is that windows startup script doesn't contain support for catalina.out. You won't find e.g. parameter CATALINA_OUT. So it's not possible to use it and you have to configure your logging library to create file by itself or fix catalina.bat. I'm not a Windows user but you should check lines like:
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% ....
and put some redirections at the end
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% .... >> %CATALINA_BASE%\logs\catalina.out
Catalina.out is not generated for windows but you can send command line tomcat output to file by editing catalina.bat or startup.bat. In startup.bat
:
replace
call "%EXECUTABLE%" start %CMD_LINE_ARGS%
with
call "%EXECUTABLE%" run >..\logs\stdout.log 2>&1 start %CMD_LINE_ARGS% run >..\logs\stdout.log 2>&1
It is in "Tomcat folder\logs", and the name is different: catalina-2011-11-23.log, where 2011-11-23 represents the date in American format.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With