public class LogOutputStream extends OutputStream
OutputStream which writes to a commons-logging Log at a particular level.| Modifier and Type | Field and Description |
|---|---|
static int |
LEVEL_DEBUG
The Constant LEVEL_DEBUG.
|
static int |
LEVEL_ERROR
The Constant LEVEL_ERROR.
|
static int |
LEVEL_FATAL
The Constant LEVEL_FATAL.
|
static int |
LEVEL_INFO
The Constant LEVEL_INFO.
|
static int |
LEVEL_OFF
The Constant LEVEL_OFF.
|
static int |
LEVEL_TRACE
The Constant LEVEL_TRACE.
|
static int |
LEVEL_WARN
The Constant LEVEL_WARN.
|
| Modifier and Type | Method and Description |
|---|---|
static PrintStream |
createPrintStream(org.slf4j.Logger log,
int level)
Creates a
PrintStream with autoFlush enabled which will write to the given Log
at the given level. |
void |
flush()
Flushes the contents of this stream to its
Log. |
int |
getLevel()
Returns the level at which this stream writes to the
Log. |
org.slf4j.Logger |
getLog()
Returns the
Log to which this stream writes. |
void |
write(int out)
Writes the specified
byte to this stream. |
close, write, writepublic static final int LEVEL_OFF
public static final int LEVEL_TRACE
public static final int LEVEL_DEBUG
public static final int LEVEL_INFO
public static final int LEVEL_WARN
public static final int LEVEL_ERROR
public static final int LEVEL_FATAL
public static PrintStream createPrintStream(org.slf4j.Logger log, int level)
PrintStream with autoFlush enabled which will write to the given Log
at the given level.log - the Log to which to writelevel - the level at which to writePrintStream that writes to the given logpublic void flush()
Log.flush in interface Flushableflush in class OutputStreampublic void write(int out)
byte to this stream.write in class OutputStreamout - the byte to writepublic org.slf4j.Logger getLog()
Log to which this stream writes.Log to which this stream writespublic int getLevel()
Log.LogCopyright © 2009–2020 psi-probe. All rights reserved.