you still have output on the console because you redirect the standard output to your file (see the '> %ACTION%-server.log' ?) the remaining output is most surely the error output which you might also want to redirect to your file i don't know the windows command for linux, i add '2>&1' before the classic redirect that tells the system to redirect the second output (ie the error output) to the 1st output (ie the standard output) somepath/mycommand 2>&1 > someotherpath/mylogfile
you can also separate the files somepath/mycommand 2> someotherpath/errorlog > someotherpath/standardlog another solution would be to tell java that System.out and System.err must be redirected to a file see java.lang.System javadoc, i know there is a setter for both streams something like System.setOut(new java.io.FileWriter("somepath/somefile"); System.setErr(new java.io.FileWriter("somepath/someotherfile"); bye David ----- Original Message ----- From: "Louis Voo" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, May 02, 2002 3:21 PM Subject: Re: How to redirect the log file from the command window to a file? > Hi Jon > Thanks for your tip, but I still got problem, the start-server.log > file is created, but no content in it, there are many print out from the > command window, but the file is still empty. Somewhere goes wrong? > > > Louis > ----- Original Message ----- > From: "Jon Wingfield" <[EMAIL PROTECTED]> > To: "Tomcat Users List" <[EMAIL PROTECTED]> > Sent: Thursday, May 02, 2002 12:01 PM > Subject: RE: How to redirect the log file from the command window to a file? > > > > 1) alter the catalina.bat file: > > > > ... extract ... > > %_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% > > %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath > > > "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_H > > OME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% > > %ACTION% > %ACTION%-server.log > > ... extract end ... > > > > this puts all the system.out into a file start-server.log in the tomcat > bin > > directory. > > > > 2) use the jakarta log4j logging package with a ConsoleAppender ;) > > > > Hope this helps, > > > > Jon > > > > -----Original Message----- > > From: Louis Voo [mailto:[EMAIL PROTECTED]] > > Sent: 02 May 2002 08:17 > > To: Tomcat Users List > > Subject: How to redirect the log file from the command window to a file? > > > > > > Hi, > > > > I'm using tomcat 4.04b2 for window. After I start my tomcat, all the > > system.out log will print out in that command window, can I redirect it to > a > > file? Please tell me how to do that. > > > > > > Thank you > > > > Louis > > > > > > > > -- > > To unsubscribe: <mailto:[EMAIL PROTECTED]> > > For additional commands: <mailto:[EMAIL PROTECTED]> > > Troubles with the list: <mailto:[EMAIL PROTECTED]> > > > > > > > > -- > > To unsubscribe: <mailto:[EMAIL PROTECTED]> > > For additional commands: <mailto:[EMAIL PROTECTED]> > > Troubles with the list: <mailto:[EMAIL PROTECTED]> > > > > > > -- > To unsubscribe: <mailto:[EMAIL PROTECTED]> > For additional commands: <mailto:[EMAIL PROTECTED]> > Troubles with the list: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]>