• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

stdout -- simple logging

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,

i am newbie to tomcat usage ...

i want to know how can i see the system.out.println debugging messages

at default stdout file under the log folder


vinay rajnish
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Output from System.out.println should end up in the %TOMCAT_HOME%/logs/catalina.out - is that not the case?
 
vianyrajnish rajnish
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi ,

i am finding only these text files

localhost_log.2007-08-01
stderr
stdout

or else can you tell me where the setting are made
to output debug messages to text file like stdout(or catalina.out)
in tomcat.

thanks,
vinay rajnish
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does one of the files you listed contain System.out output?
 
vianyrajnish rajnish
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,


No its does not contain the System.out.println ... outputs.

The outputs should come to catalina.out or the stdout ( in my case).

the problem occurs when i deleted all the contents of stdout .. so that i can see the new log results when i run freshly ...

is that creates any problem?... thats why i trying to find the root cause for this problem .. by looking at the configuration made in tomcat to direct these results...

do you know where it is configured.. in tomcat?

Vinay Rajnish
 
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have not come across any configuration , but see my System.out.print statements in catalina.out file.
In case you are starting tomcat by clicking the bat files it appears in the console.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which file they go to, depends on your version of Tomcat and how it was installed but the log will always be in TOMCAT-INSTALL/logs.

If you're running Tomcat on Windows and starting from the batch scripts, it may, (again, depending on the version) send the output to the console instead of logging it.

Personally, I stopped using System.out.println a long time ago and went with log4j. Doing so has given me much more control over how logging is performed in both the development and production environments.
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Those who are seeing the System.out.println output in catalina.out ,can you please tell me which version of tomcat you are using

Thanks
princy
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Princy Mathew:
Those who are seeing the System.out.println output in catalina.out ,can you please tell me which version of tomcat you are using

Thanks
princy



Why don't you tell us what version you are using.
Also tell us how you are starting Tomcat.
I'm guessing it's as a Windows service (which usually results in the localhost_log.2007-08-01 files you mentioned earlier).
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By the way, the best thing I've ever done, logging wise, is to replace every single System.out.println statement in my app with log4j statements. I now have complete control over where my logging takes place and can tune the logging level while my app is running.

I'll never use System.out.println in a web app again.
 
Princy Mathew
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi I am using tomcat 5.0 and I start the tomcat using startup.bat in windows.

I got an information that only if we start the tomcat as a service in the "Control Panel" ,the logs will be written to catalina.out .please see http://deegree.sourceforge.net/inf/troubleshooting.html

Can any one tell me how to start the tomcat as a service in the control panel.
reply
    Bookmark Topic Watch Topic
  • New Topic