Package io.deephaven.io.logger
Class LoggerOutputStream
java.lang.Object
java.io.OutputStream
io.deephaven.io.logger.LoggerOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
OutputStream implementation for outputting data to a Logger. Expects that each appended byte represents a char (1:1,
so only ASCII/LATIN-1 and similar charsets are supported). flush() events are ignored - we end() log entries on
newlines.
-
Constructor Summary
ConstructorDescriptionLoggerOutputStream
(Logger logger, LogLevel logLevel) Create a stream that writes bytes as chars to the specified logger at the specified level. -
Method Summary
Methods inherited from class java.io.OutputStream
close, flush, nullOutputStream, write, write
-
Constructor Details
-
LoggerOutputStream
Create a stream that writes bytes as chars to the specified logger at the specified level.- Parameters:
logger
-logLevel
-
-
-
Method Details
-
write
- Specified by:
write
in classOutputStream
- Throws:
IOException
-