Package io.micronaut.views.react.util
Class OutputStreamToSLF4J
java.lang.Object
java.io.OutputStream
io.micronaut.views.react.util.OutputStreamToSLF4J
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
An output stream that looks for line separators and then writes out the lines of text to the given logger.
-
Constructor Summary
ConstructorsConstructorDescriptionOutputStreamToSLF4J(org.slf4j.Logger logger, org.slf4j.event.Level level) Creates a logging stream for the given logger and logging level.OutputStreamToSLF4J(org.slf4j.spi.LoggingEventBuilder loggingEventBuilder) Creates a logging stream with the JVM's default character set.OutputStreamToSLF4J(org.slf4j.spi.LoggingEventBuilder loggingEventBuilder, Charset charset) Creates a logging stream with the given character set. -
Method Summary
Methods inherited from class java.io.OutputStream
close, nullOutputStream, write
-
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
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
-
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-