PrintStream getTargetPrintStream() {
        switch (outputChoiceType) {
        case SYS_OUT:
            return System.out;
        case SYS_ERR:
            return System.err;
        case CACHED_SYS_ERR:
        case CACHED_SYS_OUT:
        case FILE:
            return targetPrintStream;
        default:
            throw new IllegalArgumentException();
        }

    }
This class encapsulates the user's choice of output target.

@author Ceki G&uuml;lc&uuml;
slf4j-simple/src/main/java/org/slf4j/simple/OutputChoice.java