edu.rice.cs.plt.debug
Class OutputStreamLogSink

java.lang.Object
  extended by edu.rice.cs.plt.debug.TextLogSink
      extended by edu.rice.cs.plt.debug.IndentedTextLogSink
          extended by edu.rice.cs.plt.debug.OutputStreamLogSink
All Implemented Interfaces:
LogSink, Closeable

public class OutputStreamLogSink
extends IndentedTextLogSink

A log sink that writes tagged, indented text to an output stream.


Nested Class Summary
 
Nested classes/interfaces inherited from interface edu.rice.cs.plt.debug.LogSink
LogSink.EndMessage, LogSink.ErrorMessage, LogSink.Message, LogSink.MessageVisitor<T>, LogSink.StackMessage, LogSink.StandardMessage, LogSink.StartMessage, LogSink.ValueMessage
 
Constructor Summary
OutputStreamLogSink(OutputStream out)
           
OutputStreamLogSink(OutputStream out, int idealLineWidth)
           
OutputStreamLogSink(OutputStream out, String charset)
           
OutputStreamLogSink(OutputStream out, String charset, int idealLineWidth)
           
 
Method Summary
 void close()
           
protected  BufferedWriter writer(LogSink.Message m)
          Get a BufferedWriter for outputting the given message.
 
Methods inherited from class edu.rice.cs.plt.debug.IndentedTextLogSink
write, writeEnd, writeStart
 
Methods inherited from class edu.rice.cs.plt.debug.TextLogSink
formatLocation, formatLocation, formatThread, formatTime, log, logEnd, logError, logStack, logStart
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutputStreamLogSink

public OutputStreamLogSink(OutputStream out)

OutputStreamLogSink

public OutputStreamLogSink(OutputStream out,
                           String charset)
                    throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

OutputStreamLogSink

public OutputStreamLogSink(OutputStream out,
                           int idealLineWidth)

OutputStreamLogSink

public OutputStreamLogSink(OutputStream out,
                           String charset,
                           int idealLineWidth)
                    throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException
Method Detail

close

public void close()
           throws IOException
Throws:
IOException

writer

protected BufferedWriter writer(LogSink.Message m)
Description copied from class: IndentedTextLogSink
Get a BufferedWriter for outputting the given message.

Specified by:
writer in class IndentedTextLogSink