Class LoggingOutputStream

  • All Implemented Interfaces:
    Closeable, Flushable, AutoCloseable

    public class LoggingOutputStream
    extends ByteArrayOutputStream
    Implementation of a OutputStream that flush the records to a Logger. This is useful to redirect stderr and stdout to loggers.

    User: Jerome Dochez author: Jerome Dochez, Carla Mott

    • Constructor Detail

      • LoggingOutputStream

        public LoggingOutputStream​(Logger logger,
                                   Level level)
        Constructor
        Parameters:
        logger - Logger to write to
        level - Level at which to write the log message