I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 8fd354ee authored by zzz's avatar zzz
Browse files

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

parent f611f4c9
No related branches found
No related tags found
No related merge requests found
......@@ -153,6 +153,8 @@ public class Router implements RouterClock.ClockShiftListener {
// just in case, lets make it explicit...
TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
}
// Note: I2P_DISABLE_OUTPUT_OVERRIDE implemented in startup/WorkingDir.java
// https://www.kb.cert.org/vuls/id/402580
// http://docs.codehaus.org/display/JETTY/SystemProperties
// Fixed in Jetty 5.1.15 but we are running 5.1.12
......
......@@ -60,7 +60,8 @@ public class WorkingDir {
* Only call this once on router invocation.
* Caller should store the return value for future reference.
*
* This also redirects stdout and stderr to a wrapper.log file if there is no wrapper present.
* This also redirects stdout and stderr to a wrapper.log file if there is no wrapper present,
* unless system property I2P_DISABLE_OUTPUT_OVERRIDE is set.
*
* @param migrateOldConfig whether to copy all data over from an existing install
*/
......@@ -262,7 +263,8 @@ public class WorkingDir {
}
/**
* Redirect stdout and stderr to a wrapper.log file if there is no wrapper.
* Redirect stdout and stderr to a wrapper.log file if there is no wrapper,
* unless system property I2P_DISABLE_OUTPUT_OVERRIDE is set.
*
* If there is no -Dwrapper.log=/path/to/wrapper.log on the java command line
* to specify a log file, check for existence of wrapper.log in CWD,
......@@ -275,7 +277,9 @@ public class WorkingDir {
* @since 0.8.13
*/
private static void setupSystemOut(String dir) {
if (System.getProperty("wrapper.version") != null)
if (SystemVersion.hasWrapper())
return;
if (System.getProperty("I2P_DISABLE_OUTPUT_OVERRIDE") != null)
return;
String path = System.getProperty(PROP_WRAPPER_LOG);
File logfile;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment