0

all the error messages are being displayed in console. i want the tomcat to print in log files stdout and stderr .. how to configure that?(i am using windows XP)

Decado
  • 1,949
  • 11
  • 17
Muralidharan
  • 1
  • 1
  • 1

2 Answers2

2

Looks like windows will work the same as unix in the regard.

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/redirection.mspx?mfr=true

So from a cmd window you'd have to do

statup.bat 1>out.log 2>err.log
Decado
  • 1,949
  • 11
  • 17
  • this is not working.. it just shows environment variables and thats it.. doesnt show the log. – Muralidharan Mar 18 '11 at 10:15
  • any other suggestions guys? – Muralidharan Mar 18 '11 at 11:16
  • Okaym i'm not sure you can do that easily. The problem is that when you start tomcat it forks a java process to actually run tomcat in, hence you get a new console window appearing. You'd have to figure out how to get java running in process, which might be a little difficult. CWhy do you need it righting to stdout and sterr? Can't you just tail the log files in the logs dir? – Decado Mar 18 '11 at 11:42
  • how do i tail the log files in the logs dir? do u mean the tail command? i am on Windows XP – Muralidharan Mar 18 '11 at 11:58
  • Have a look here http://tailforwin32.sourceforge.net/ for tail for windows. – Decado Mar 18 '11 at 12:00
1

If started as a Windows service, you can configure the file locations for the stdout and stderr messages from the Service Manager.

This link has a screenshot and reference. See section "Testing #2"

JoseK
  • 455
  • 6
  • 13
  • no the tomcat 6 i downloaded isnt an installer. i start the tomcat by double clicking the startup.bat file from the bin folder and an console opens that shows all the log statements.. how to redirect that to a stdout and stderr log files? – Muralidharan Mar 18 '11 at 05:29