|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface LogSink
A destination for log messages. After front-end processing in a Log, which determines the calling
time, stack, etc., log messages are created and passed to a sink, which records them as desired. LogSinks
are often associated with system resources, and so care should be taken to close them when no longer needed.
IOUtil.closeOnExit(java.io.Closeable) allows LogSinks to be closed at program termination.
LogSink implementations should be thread-safe: each log invocation should appear to have executed
atomically.
| Nested Class Summary | |
|---|---|
static class |
LogSink.EndMessage
A message signifying the end of a block of code. |
static class |
LogSink.ErrorMessage
A message logging the occurrence of some error (a Throwable). |
static class |
LogSink.Message
|
static interface |
LogSink.MessageVisitor<T>
|
static class |
LogSink.StackMessage
A message logging the thread's current stack trace. |
static class |
LogSink.StandardMessage
A standard logging message, which may include a text message and name-value pairs. |
static class |
LogSink.StartMessage
A message signifying the beginning of a block of code. |
static class |
LogSink.ValueMessage
|
| Method Summary | |
|---|---|
void |
log(LogSink.StandardMessage m)
|
void |
logEnd(LogSink.EndMessage m)
|
void |
logError(LogSink.ErrorMessage m)
|
void |
logStack(LogSink.StackMessage m)
|
void |
logStart(LogSink.StartMessage m)
|
| Methods inherited from interface java.io.Closeable |
|---|
close |
| Method Detail |
|---|
void log(LogSink.StandardMessage m)
void logStart(LogSink.StartMessage m)
void logEnd(LogSink.EndMessage m)
void logError(LogSink.ErrorMessage m)
void logStack(LogSink.StackMessage m)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||