public class LogWriter extends Writer
Modifier and Type | Class and Description |
---|---|
static class |
LogWriter.LogLevel
Log levels that
LogWriter can output to. |
Constructor and Description |
---|
LogWriter(Logger logger,
LogWriter.LogLevel level) |
LogWriter(Object lock,
Logger logger,
LogWriter.LogLevel level) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
void |
write(char[] cbuf,
int off,
int len) |
public LogWriter(Logger logger, LogWriter.LogLevel level)
logger
- the logger to log tolevel
- the level to log atNullPointerException
- if logger or level is nullpublic LogWriter(Object lock, Logger logger, LogWriter.LogLevel level)
lock
- the locklogger
- the logger to log tolevel
- the level to log atNullPointerException
- if logger or level is nullpublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class Writer
IOException
Writer.close()
public void flush() throws IOException
flush
in interface Flushable
flush
in class Writer
IOException
Writer.flush()
public void write(char[] cbuf, int off, int len) throws IOException
write
in class Writer
IOException
Writer.write(char[], int, int)