public class LogPrintWriter extends PrintWriter
Writer
or a Logger
.out
Constructor and Description |
---|
LogPrintWriter(org.slf4j.Logger log)
Creates a new
LogPrintWriter which is based on a
Logger . |
LogPrintWriter(Writer out)
Creates a new
LogPrintWriter which is based on a
Writer . |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
void |
println() |
void |
setLogger(org.slf4j.Logger log)
Sets a new
Logger . |
void |
setWriter(Writer out)
Sets a new output
Writer . |
void |
write(char[] cbuf,
int off,
int len) |
void |
write(int c) |
void |
write(String str,
int off,
int len) |
public LogPrintWriter(Writer out)
LogPrintWriter
which is based on a
Writer
.out
- the base Writer
.public LogPrintWriter(org.slf4j.Logger log)
LogPrintWriter
which is based on a
Logger
.log
- the base Logger
.public void setWriter(Writer out)
Writer
. Calling this method will flush
this LogPrintWriter
before the new Writer
out
is set.out
- the Writer
to use for output.public void setLogger(org.slf4j.Logger log)
Logger
. Calling this method will flush this
LogPrintWriter
before the new Logger
is set.log
- the new Logger
to use for output.public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in class PrintWriter
public void flush()
flush
in interface Flushable
flush
in class PrintWriter
public void write(int c)
write
in class PrintWriter
public void write(char[] cbuf, int off, int len)
write
in class PrintWriter
public void write(String str, int off, int len)
write
in class PrintWriter
public void println()
println
in class PrintWriter
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.