Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the "catalina.out" on Windows?

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

like image 231
Pen Avatar asked Nov 23 '11 09:11

Pen


3 Answers

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
like image 151
Andrzej Polis Avatar answered Oct 20 '22 12:10

Andrzej Polis


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
like image 4
tkolleh Avatar answered Oct 20 '22 13:10

tkolleh


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.

like image 3
belgther Avatar answered Oct 20 '22 12:10

belgther