On Wed, 12 Apr 2000, Tom Tromey wrote: > So write a PrintStream subclass which calls log(), create it at > startup from a place where log() is visible, and call System.setOut > and System.setErr with it as the argument.
Thanks for the hint. I tried import java.io.*; import javax.servlet.*; public class LogWriter extends PrintStream { public static void SetLog(GenericServlet gs) { System.setErr(gs.log); } } May be you immediately see the problem why the compiler fails but I'm not experienced enough tocope with the following error message: CLASSPATH=".:/usr/lib/jdk1.1/lib/classes.zip:/usr/share/java/ApacheJServ.jar:/usr/share/java/servlet-2.0.jar" jikes -g LogWriter.java Found 3 semantic errors compiling "LogWriter.java": 5. public class LogWriter extends PrintStream <---------------------------> *** Error: No match was found for constructor "PrintStream()". 8. System.setOut(gs.log()); <------> *** Error: No match was found for method "log()". 9. System.setErr(gs.log); <----> *** Error: No field named "log" was found in type "javax/servlet/GenericServlet". May be such not Debian related questions are OT here but I was ignored in a Java related newsgroup. Any suggestions for a Java mailing list which is a better target for such kind of questions? Kind regards Andreas.