public class LoggingOutputStream extends FilterOutputStream
LoggingByteArrayOutputStream.out| Constructor and Description |
|---|
LoggingOutputStream(OutputStream outputStream,
Logger logger,
Level loggingLevel,
int contentLoggingLimit) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
LoggingByteArrayOutputStream |
getLogStream()
Returns the log stream.
|
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
flush, writepublic 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 FilterOutputStreamIOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
write in class FilterOutputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FilterOutputStreamIOExceptionpublic final LoggingByteArrayOutputStream getLogStream()
Copyright © 2011–2024 Google. All rights reserved.