We just installed TomCat-3.2.1 in stand-alone mode and JVM is jdk1.2.2; Now System.out.println goes to TomCat console, we want to go to a log file. How and where to do the required set-up. Thanks in advance.
hi, i too is going through tomcat right now. as per my knowledge a option is to make a log writer that writes to a file or u can also change your default err output to a file. for that, i think u need to connect file output stream and system.err. nitin
posted 16 years ago
Thanks Nitin ! I am looking if there is any way to do set up in web.xml or server.xml or ... to direct the System.out and System.err. In my program I have used like this PrintStream n = new PrintStream( new FileOutputStream("c:/khudi/log.txt", true), true) ; System.setErr(n); System.err.println("My Error");
This works and goes to c:/khudi/log.txt but to know if we can set up somewhere instead of using the above. Thanks. Khudiram
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads