Package com.iizix.log
Class ConsoleRedirector
java.lang.Object
com.iizix.log.ConsoleRedirector
Class to handle redirection of stdout and stderr to the logger.
- Author:
- Christopher Mindus
Method Summary
Modifier and TypeMethodDescriptionstatic PrintStream[]
Starts the redirection of System.out and System.err.
Method Details
intialize
Starts the redirection of System.out and System.err.- Returns:
- Array of length 2 original output streams, index 0 = stdout, 1 = stderr.
- Throws:
IllegalStateException
- If this has already been done.SecurityException
- If a security manager exists and itscheckPermission
method doesn't allow reassigning of the standard output or error output stream.