Package io.deephaven.base.system
Class PrintStreamGlobals
java.lang.Object
io.deephaven.base.system.PrintStreamGlobals
Captures
System.out
and System.err
. It is primarily useful for logging infrastructure where the
output streams may have been redirected.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic PrintStream
getErr()
static PrintStream
getOut()
static void
init()
Use this method to force this class and its statics to be initialized.
-
Constructor Details
-
PrintStreamGlobals
public PrintStreamGlobals()
-
-
Method Details
-
init
public static void init()Use this method to force this class and its statics to be initialized. Should be used before an application is re-directing stdout / stderr if it wants to have global access to the original streams. While the other methods in this class could be used for initialization, this method provides the appropriate context, and should be used instead. -
getOut
- Returns:
System.out
, as seen at class initialization time
-
getErr
- Returns:
System.err
, as seen at class initialization time
-