com.ryanm.logging
Class StreamSink

java.lang.Object
  extended by com.ryanm.logging.AbstractSink
      extended by com.ryanm.logging.StringSink
          extended by com.ryanm.logging.StreamSink
All Implemented Interfaces:
Configurable, LogSink

public class StreamSink
extends StringSink

Logs messages in human-readable format to the supplied OutputStream. Each log message is seperated by a line break.

Author:
ryanm

Nested Class Summary
 
Nested classes/interfaces inherited from class com.ryanm.logging.StringSink
StringSink.StringSinkConfigurator
 
Constructor Summary
StreamSink(java.io.OutputStream ios, java.lang.String description)
          Constructs a new sink that will write messages to the supplied stream
 
Method Summary
protected  void writeString(java.lang.String s)
          This should be overridden to write the supplied string to wherever, stdOut, a file, something like that.
 
Methods inherited from class com.ryanm.logging.StringSink
getConfigurator, log
 
Methods inherited from class com.ryanm.logging.AbstractSink
addSinkListener, getTitle, notifyListeners, removeSinkListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamSink

public StreamSink(java.io.OutputStream ios,
                  java.lang.String description)
Constructs a new sink that will write messages to the supplied stream

Parameters:
ios - The stream to write to
description - A name to give the sink
Method Detail

writeString

protected void writeString(java.lang.String s)
Description copied from class: StringSink
This should be overridden to write the supplied string to wherever, stdOut, a file, something like that.

Specified by:
writeString in class StringSink
Parameters:
s - The String to write