9

I have no idea, how and what to set up, to have catalina.out on the Tomcat on my computer.

I use Tomcat 6.0.28, zipped-version on Windows XP. To start server I just run startup.bat-file.

Do I do something wrong?!

Thanks in advance for any advices.

Mur

[Edited] All records (Exceptions or System.out) will be written in console window. Where to set up, that they would be written to catalina.out?

As I wrote in one of my comments, if I install Tomcat with setup-version, all messages occur in stdout_YYYYMMDD.log and I don't see, where to change this.

Tima
  • 12,765
  • 23
  • 82
  • 125

4 Answers4

8

Looks like Tomcat 6 on Windows does not write to catalina.out

I can see why this is happening, but not sure where to fix it.

catalina.sh has this line which sends the System outs into catalina.out

"$CATALINA_BASE"/logs/catalina.out 2>&1

this line is missing from catalina.bat which is why this does not appear on windows.

newtoallthis
  • 173
  • 6
  • Thank you. I tried your solution, but ... I just give up. It's really the easiest way to install Tomcat from setup-file on Windows to output all logs into a log-file. – Tima Aug 18 '10 at 08:04
4

I have written a batch file 'start&log.bat' and put it in tomcat\bin directory. The batch file has one line:

catalina run > ..\logs\catalina.out 2<&1
Mark
  • 17,887
  • 13
  • 66
  • 93
  • Hi Mark. I know this is a bit out of date, but I cannot get this to work. Is there anything else I need to add to the batch file? I am still not getting a catalina.out, despite errors. Thanks! – justian17 Feb 18 '14 at 00:11
  • @IliaKoulikov it works for me though,is your problem solved or you want my help? – SpringLearner Mar 27 '15 at 11:21
  • Thanks, SpringLearner, but I've found a way around it since then. – justian17 Apr 27 '15 at 13:13
0

Are you running any applications with the application server as I think it only creates the file when there is an error in an application.

Dean
  • 8,668
  • 17
  • 57
  • 86
  • No, it created no file also in error case. At least I think so. I try to produce some errors and will see. And I've installed for 5 minutes executable version of Tomcat. Now it writes logs now, but there is still no catalina.out, but at least something. Can I setup my application to write logs into catalina.out and if yes, how?! – Tima Aug 16 '10 at 08:55
  • Also errors will be written in stdout_YYYYMMDD.log (today in stdout_20100816.log), but I would like to have them in catalina.out. Some Ideas? – Tima Aug 16 '10 at 09:15
-2

my experience is that these logs are always produced somewhere, even if not in catalina.out. on Linux 7 tomcat7 yum installed, my system.out.println( messages end up in /var/log/message. fine with me, as long as I can find them. found them there with grep -r 'system.out.println(' * from root directory. Command takes a long time to run.

jal
  • 1