public class LoggingOutputStream extends FilterOutputStream
LoggingByteArrayOutputStream
.out
Constructor | Description |
---|---|
LoggingOutputStream(OutputStream outputStream,
Logger logger,
Level loggingLevel,
int contentLoggingLimit) |
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
|
LoggingByteArrayOutputStream |
getLogStream() |
Returns the log stream.
|
void |
write(byte[] b,
int off,
int len) |
|
void |
write(int b) |
flush, write
public LoggingOutputStream(OutputStream outputStream, Logger logger, Level loggingLevel, int contentLoggingLimit)
outputStream
- output stream to forward all writes tologger
- loggerloggingLevel
- logging levelcontentLoggingLimit
- maximum number of bytes to log (may be 0
to avoid logging
content)public void write(int b) throws IOException
write
in class FilterOutputStream
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in class FilterOutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in class FilterOutputStream
IOException
public final LoggingByteArrayOutputStream getLogStream()
Copyright © 2011–2019 Google. All rights reserved.