Opened 3 years ago

Closed 3 years ago

#2037 closed enhancement (fixed)

Router should not redirect System.out and System.err

Reported by: ocean1 Owned by: zzz
Priority: minor Milestone: 0.9.32
Component: router/general Version: 0.9.31
Keywords: Cc:
Parent Tickets: Sensitive: no



Right now when a Router starts up it will redirect System.out and System.err to the wrapper.log file. This plays havoc with an application that embeds the Router.

See this code in WorkingDir?.java:


Applications can short-circuit this behavior using the code:

System.setProperty("wrapper.version", "NO_WRAPPER");


Ideally the router would look for positive confirmation that a wrapper is doing is being used before redirecting System.out and System.err. There should perhaps be a system property and/or a static method that tests whether a wrapper is in use.


Change History (2)

comment:1 Changed 3 years ago by zzz

Milestone: undecided0.9.32
Owner: set to zzz
Status: newaccepted
Type: defectenhancement

We do look for "positive confirmation" - that's the check for wrapper.version. That IS the system property.

However, there are other places in the code that rely on that also, so the workaround isn't great.

We'd be happy to add a new property, similar to the other ones (see line 130 if you haven't yet). Probably I2P_DISABLE_OUTPUT_OVERRIDE

comment:2 Changed 3 years ago by zzz

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.