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 Closeableclose in interface AutoCloseableclose in class WriterIOExceptionWriter.close()public void flush()
throws IOException
flush in interface Flushableflush in class WriterIOExceptionWriter.flush()public void write(char[] cbuf,
int off,
int len)
throws IOException
write in class WriterIOExceptionWriter.write(char[], int, int)