tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup CatalinaService.java
Date Fri, 02 Jul 2004 22:11:49 GMT
markt       2004/07/02 15:11:49

  Modified:    catalina/src/share/org/apache/catalina/startup
                        CatalinaService.java
  Log:
  Fix bug 26021. When running as a service, swallowOuput had no effect
  Remove unused imports - Eclipse
  
  Revision  Changes    Path
  1.11      +10 -14    jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/CatalinaService.java
  
  Index: CatalinaService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/CatalinaService.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- CatalinaService.java	24 Oct 2002 02:42:03 -0000	1.10
  +++ CatalinaService.java	2 Jul 2004 22:11:49 -0000	1.11
  @@ -66,20 +66,11 @@
   
   
   import java.io.File;
  -import java.io.IOException;
  -import java.io.OutputStream;
  -import java.lang.reflect.InvocationTargetException;
  -import java.lang.reflect.Constructor;
  -import java.net.Socket;
   import java.security.Security;
  -import java.util.Stack;
  -import org.apache.catalina.Container;
   import org.apache.catalina.Lifecycle;
   import org.apache.catalina.LifecycleException;
  -import org.apache.catalina.LifecycleListener;
  -import org.apache.catalina.Server;
  -import org.apache.catalina.Loader;
   import org.apache.commons.digester.Digester;
  +import org.apache.tomcat.util.log.SystemLogHandler;
   
   
   /**
  @@ -266,6 +257,11 @@
        * Start a new server instance.
        */
       public void start() {
  +
  +        // Replace System.out and System.err with a custom PrintStream
  +        SystemLogHandler log = new SystemLogHandler(System.out);
  +        System.setOut(log);
  +        System.setErr(log);
   
           // Start the new server
           if (server instanceof Lifecycle) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message