|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.Writer
org.apache.sling.scripting.core.impl.LogWriter
public class LogWriter
The 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.
Field Summary |
---|
Fields inherited from class java.io.Writer |
---|
lock |
Constructor Summary | |
---|---|
LogWriter(org.slf4j.Logger logger)
Creates a writer based on the given logger. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.io.Writer |
---|
append, append, append, write, write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LogWriter(org.slf4j.Logger logger)
Method Detail |
---|
public void write(int c)
write
in class Writer
public void write(char[] cbuf, int off, int len)
write
in class Writer
public void flush()
flush
in interface Flushable
flush
in class Writer
public void close()
flush()
close
in interface Closeable
close
in class Writer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |