• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat Debugging...Help!

 
bob dapaah
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know how to view debugging System.out.println() statements using Tomcat in Linux?
In Windows a dos window allows theses statements to be viewed but when Tomcat is started in Linux the startup.sh exits and no debugging info is printed.
 
Ravi Veera
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the logs directory. From the script I see the output being redirected to catalina.out. To monitor it as the server is running you can do a tail -f catalina.out.
HTH
Ravi
 
bob dapaah
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply, but I'm still uncertain as to which script and how to amend the output.
I've found references to catalina.out in the catalina.sh:
touch "$CATALINA_BASE"/logs/catalina.out
Are you suggesting I modify this line somehow?
Sorry if it's too simple a question.
 
Ravi Veera
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You do not have to modify anything if all you want to do is monitor the output.
tail is a Unix command which prints out the last 10 lines of any file.
tail catalina.log
will print out the last 10 lines of catalina.log
tail -15 catilana.log will print out the last 15 lines of catalina.log.
If you are following the log and want to save yourself the effort of repeatedly tyoin the tail command use
tail -f catalina.log.(f as in follow).
To break out of the viewing the log you can do a Ctrl-C.
Regards
Ravi
[ May 14, 2002: Message edited by: Ravi Veeraghanta ]
 
bob dapaah
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the help. It works
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic