edu.rice.cs.plt.debug
Interface LogSink

All Superinterfaces:
Closeable
All Known Implementing Classes:
AssertEmptyLogSink, AsynchronousLogSink, FileLogSink, FilteredLogSink, IndentedTextLogSink, OutputStreamLogSink, PopupLogSink, RMILogSink, SplitLogSink, SystemErrLogSink, SystemOutLogSink, TextLogSink, TreeLogSink, WriterLogSink

public interface LogSink
extends Closeable

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

log

void log(LogSink.StandardMessage m)

logStart

void logStart(LogSink.StartMessage m)

logEnd

void logEnd(LogSink.EndMessage m)

logError

void logError(LogSink.ErrorMessage m)

logStack

void logStack(LogSink.StackMessage m)