public class LogWriter extends Writer
LogWriter is a simple Writer which writes
lines of data to a given SLF4J Logger. Data is gathered in an internal buffer
until the flush() method is called or until a CR or LF character is
encountered in the data to be written.| Constructor and Description |
|---|
LogWriter(org.slf4j.Logger logger)
Creates a writer based on the given logger.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Just calls
flush() |
void |
flush()
Writes any data conained in the buffer to the logger as an error message.
|
void |
write(char[] cbuf,
int off,
int len)
Writes the indicated characters to the internal buffer, flushing the
buffer on any occurrence of a CR of LF.
|
void |
write(int c)
Writes the character to the internal buffer unless the character is a CR
or LF in which case the buffer is written to the logger as an error
message.
|
public LogWriter(org.slf4j.Logger logger)
logger - the loggerpublic void write(int c)
public void write(char[] cbuf,
int off,
int len)
public void flush()
Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.