Changeset 8fd354e


Ignore:
Timestamp:
Sep 2, 2017 12:12:08 PM (3 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
8d89d1ee
Parents:
f611f4c9
Message:

Startup: Add property to disable output redirect (ticket #2037)

Location:
router/java/src/net/i2p/router
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/Router.java

    rf611f4c9 r8fd354e  
    154154            TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
    155155        }
     156        // Note: I2P_DISABLE_OUTPUT_OVERRIDE implemented in startup/WorkingDir.java
     157
    156158        // https://www.kb.cert.org/vuls/id/402580
    157159        // http://docs.codehaus.org/display/JETTY/SystemProperties
  • router/java/src/net/i2p/router/startup/WorkingDir.java

    rf611f4c9 r8fd354e  
    6161     * Caller should store the return value for future reference.
    6262     *
    63      * This also redirects stdout and stderr to a wrapper.log file if there is no wrapper present.
     63     * This also redirects stdout and stderr to a wrapper.log file if there is no wrapper present,
     64     * unless system property I2P_DISABLE_OUTPUT_OVERRIDE is set.
    6465     *
    6566     * @param migrateOldConfig whether to copy all data over from an existing install
     
    263264
    264265    /**
    265      *  Redirect stdout and stderr to a wrapper.log file if there is no wrapper.
     266     *  Redirect stdout and stderr to a wrapper.log file if there is no wrapper,
     267     *  unless system property I2P_DISABLE_OUTPUT_OVERRIDE is set.
    266268     *
    267269     *  If there is no -Dwrapper.log=/path/to/wrapper.log on the java command line
     
    276278     */
    277279    private static void setupSystemOut(String dir) {
    278         if (System.getProperty("wrapper.version") != null)
     280        if (SystemVersion.hasWrapper())
     281            return;
     282        if (System.getProperty("I2P_DISABLE_OUTPUT_OVERRIDE") != null)
    279283            return;
    280284        String path = System.getProperty(PROP_WRAPPER_LOG);
Note: See TracChangeset for help on using the changeset viewer.