Class OutputStreamToSLF4J

java.lang.Object
java.io.OutputStream
io.micronaut.views.react.util.OutputStreamToSLF4J
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

@Internal public final class OutputStreamToSLF4J extends OutputStream
An output stream that looks for line separators and then writes out the lines of text to the given logger.
  • Constructor Details

    • OutputStreamToSLF4J

      public OutputStreamToSLF4J(org.slf4j.spi.LoggingEventBuilder loggingEventBuilder)
      Creates a logging stream with the JVM's default character set.
      Parameters:
      loggingEventBuilder - Lets you customize how the log events are sent to SLF4J (e.g. level, logger).
    • OutputStreamToSLF4J

      public OutputStreamToSLF4J(org.slf4j.spi.LoggingEventBuilder loggingEventBuilder, Charset charset)
      Creates a logging stream with the given character set.
      Parameters:
      loggingEventBuilder - Lets you customize how the log events are sent to SLF4J (e.g. level, logger).
      charset - Encoding of strings being written to the output stream.
    • OutputStreamToSLF4J

      public OutputStreamToSLF4J(org.slf4j.Logger logger, org.slf4j.event.Level level)
      Creates a logging stream for the given logger and logging level.
      Parameters:
      logger - The SLF4J logger object that the stream should emit to.
      level - What severity to log lines at.
  • Method Details