View | Details | Raw Unified | Return to bug 18462
Collapse All | Expand All

(-)Server.java.orig (+14 lines)
Lines 148-153 Link Here
148
    public void setShutdown(String shutdown);
148
    public void setShutdown(String shutdown);
149
    /**
150
     * Return the output redirect setting
151
     */
152
    public boolean getOutputRedirect();
153
154
155
    /**
156
     * Set the output redirect switch setting
157
     *
158
     * @param outputRedirect The new setting
159
     */
160
    public void setOutputRedirect(boolean outputRedirect);
161
162
149
    // --------------------------------------------------------- Public Methods
163
    // --------------------------------------------------------- Public Methods
(-)StandardServer.java.orig (+30 lines)
Lines 245-250 Link Here
245
    /**
245
    /**
246
     * Output redirect switch. Allows redirection of System.out and System.err
247
     * carried out by a containing app to be maintained if set to false.
248
     *
249
     */
250
    private boolean outputRedirect = true;
251
252
253
    /**
246
     * Global naming resources context.
254
     * Global naming resources context.
247
     */
255
     */
248
    private javax.naming.Context globalNamingContext = null;
256
    private javax.naming.Context globalNamingContext = null;
Lines 351-356 Link Here
351
    /**
359
    /**
360
     * Return the output redirect setting.
361
     */
362
    public boolean getOutputRedirect() {
363
364
        return (this.outputRedirect);
365
366
    }
367
368
369
    /**
370
     * Set the output redirect switch setting.
371
     *
372
     * @param outputRedirect The new setting.
373
     */
374
    public void setOutputRedirect(boolean outputRedirect) {
375
376
        this.outputRedirect = outputRedirect;
377
378
    }
379
380
381
    /**
352
     * Return the global naming resources context.
382
     * Return the global naming resources context.
353
     */
383
     */
354
    public javax.naming.Context getGlobalNamingContext() {
384
    public javax.naming.Context getGlobalNamingContext() {
(-)Catalina.java.orig (-4 / +7 lines)
Lines 498-507 Link Here
498
                "java.,org.apache.catalina.,org.apache.jasper.,org.apache.coyote.");
498
                "java.,org.apache.catalina.,org.apache.jasper.,org.apache.coyote.");
499
        }
499
        }
500
        // Replace System.out and System.err with a custom PrintStream
500
        // Replace System.out and System.err with a custom PrintStream only if the
501
        SystemLogHandler log = new SystemLogHandler(System.out);
501
        // outputRedirect switch is true (default)
502
        System.setOut(log);
502
        if (server.getOutputRedirect() == true) {
503
        System.setErr(log);
503
          SystemLogHandler log = new SystemLogHandler(System.out);
504
          System.setOut(log);
505
          System.setErr(log);
506
        }
504
        Thread shutdownHook = new CatalinaShutdownHook();
507
        Thread shutdownHook = new CatalinaShutdownHook();
(-)server.xml.orig (-1 / +1 lines)
Lines 10-16 Link Here
10
     define subcomponents such as "Valves" or "Loggers" at this level.
10
     define subcomponents such as "Valves" or "Loggers" at this level.
11
 -->
11
 -->
12
<Server port="8005" shutdown="SHUTDOWN" debug="0">
12
<Server port="8005" shutdown="SHUTDOWN" debug="0" outputRedirect="true">
13
  <!-- Comment these entries out to disable JMX MBeans support -->
13
  <!-- Comment these entries out to disable JMX MBeans support -->

Return to bug 18462