|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
java.io.ByteArrayOutputStream
org.tentackle.util.LoggerOutputStream
public class LoggerOutputStream
Output stream for a logger.
Nice to catch e.printStackTrace(Stream)
| Field Summary |
|---|
| Fields inherited from class java.io.ByteArrayOutputStream |
|---|
buf, count |
| Constructor Summary | |
|---|---|
LoggerOutputStream(Logger logger)
Creates a logger output stream with a default buffersize and org.tentackle.util.Level#SEVERE. |
|
LoggerOutputStream(Logger logger,
Logger.Level level)
Creates a logger output stream with a default buffersize. |
|
LoggerOutputStream(Logger logger,
Logger.Level level,
int size)
Creates a logger output stream. |
|
| Method Summary | |
|---|---|
void |
close()
Closing a ByteArrayOutputStream has no effect. |
void |
flush()
Flushes this output stream and forces any buffered output bytes to be written out. |
static void |
logException(Exception e)
Logs an exception stacktrace to the logger with a default buffersize and org.tentackle.util.Level#SEVERE to
the default logger of the util package. |
static void |
logException(Exception e,
Logger logger)
Logs an exception stacktrace to the logger with a default buffersize and org.tentackle.util.Level#SEVERE. |
static void |
logException(Exception e,
Logger logger,
Logger.Level level,
int size)
Logs an exception stacktrace to the logger. |
| Methods inherited from class java.io.ByteArrayOutputStream |
|---|
reset, size, toByteArray, toString, toString, toString, write, write, writeTo |
| Methods inherited from class java.io.OutputStream |
|---|
write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LoggerOutputStream(Logger logger,
Logger.Level level,
int size)
logger - the loggerlevel - one of org.tentackle.util.Level#SEVERE, etc...size - the buffersize
public LoggerOutputStream(Logger logger,
Logger.Level level)
logger - the loggerlevel - one of org.tentackle.util.Level#SEVERE, etc...public LoggerOutputStream(Logger logger)
org.tentackle.util.Level#SEVERE.
logger - the logger| Method Detail |
|---|
public void flush()
java.io.OutputStreamflush is
that calling it is an indication that, if any bytes previously
written have been buffered by the implementation of the output
stream, such bytes should immediately be written to their
intended destination.
If the intended destination of this stream is an abstraction provided by the underlying operating system, for example a file, then flushing the stream guarantees only that bytes previously written to the stream are passed to the operating system for writing; it does not guarantee that they are actually written to a physical device such as a disk drive.
The flush method of OutputStream does nothing.
flush in interface Flushableflush in class OutputStreampublic void close()
java.io.ByteArrayOutputStream
close in interface Closeableclose in class ByteArrayOutputStream
public static void logException(Exception e,
Logger logger,
Logger.Level level,
int size)
e - the exceptionlogger - the loggerlevel - the logging levelsize - the buffersize
public static void logException(Exception e,
Logger logger)
org.tentackle.util.Level#SEVERE.
e - the exceptionlogger - the loggerpublic static void logException(Exception e)
org.tentackle.util.Level#SEVERE to
the default logger of the util package.
e - the exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||