Class PrintStreamGlobals

java.lang.Object
io.deephaven.base.system.PrintStreamGlobals

public class PrintStreamGlobals extends Object
Captures System.out and System.err. It is primarily useful for logging infrastructure where the output streams may have been redirected.
  • 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

      public static PrintStream getOut()
      Returns:
      System.out, as seen at class initialization time
    • getErr

      public static PrintStream getErr()
      Returns:
      System.err, as seen at class initialization time