Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=18462
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 13 Jan 2011 00:55:02 +0000 (00:55 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 13 Jan 2011 00:55:02 +0000 (00:55 +0000)
Don't merge stdout and stderr internally

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1058379 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/startup/Catalina.java
java/org/apache/catalina/startup/Embedded.java
webapps/docs/changelog.xml

index 0359999..f164ca4 100644 (file)
@@ -759,9 +759,8 @@ public class Catalina {
 
     protected void initStreams() {
         // Replace System.out and System.err with a custom PrintStream
-        SystemLogHandler systemlog = new SystemLogHandler(System.out);
-        System.setOut(systemlog);
-        System.setErr(systemlog);
+        System.setOut(new SystemLogHandler(System.out));
+        System.setErr(new SystemLogHandler(System.err));
     }
 
 
index a9f67dd..ef8df67 100644 (file)
@@ -967,9 +967,8 @@ public class Embedded  extends StandardService {
     protected void initStreams() {
         if (redirectStreams) {
             // Replace System.out and System.err with a custom PrintStream
-            SystemLogHandler systemlog = new SystemLogHandler(System.out);
-            System.setOut(systemlog);
-            System.setErr(systemlog);
+            System.setOut(new SystemLogHandler(System.out));
+            System.setErr(new SystemLogHandler(System.err));
         }
     }
     
index 41dd775..7d2e3cb 100644 (file)
 <section name="Tomcat 7.0.7 (markt)">
   <subsection name="Catalina">
     <changelog>
+      <fix>
+        <bug>18462</bug>: Don&apos;t merge <code>stdout</code> and
+        <code>stderr</code> internally so users retain the option to treat the
+        separately. (markt)
+      </fix>
       <update>
         Improve fix for <bug>50205</bug> to trigger an error earlier if invalid
         configuration is used. (markt)