Package com.iizix.log

Class ConsoleRedirector


  • public final class ConsoleRedirector
    extends java.lang.Object
    Class to handle redirection of stdout and stderr to the logger.
    Author:
    Christopher Mindus
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.io.PrintStream[] intialize()
      Starts the redirection of System.out and System.err.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • intialize

        public static java.io.PrintStream[] intialize()
        Starts the redirection of System.out and System.err.
        Returns:
        Array of length 2 original output streams, index 0 = stdout, 1 = stderr.
        Throws:
        java.lang.IllegalStateException - If this has already been done.
        java.lang.SecurityException - If a security manager exists and its checkPermission method doesn't allow reassigning of the standard output or error output stream.