Details
-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
-
None
Description
I give via reflection access to System.out & System.err to ConsoleTarget.
Field streamField = ConsoleTarget.class.getDeclaredField("stream"); streamField.setAccessible(true); streamField.set(ConsoleTarget.SystemOut, System.out); streamField.set(ConsoleTarget.SystemErr, System.err); streamField.setAccessible(false);
Then I change the value of System.out & System.err, so they will create a call to info or error for each line received.
It would be nicer if I did not have to use reflection to do this.