org.eclipse.actf.util.logging
Class StreamErrorLogger

java.lang.Object
  extended by org.eclipse.actf.util.logging.AbstractErrorLogger
      extended by org.eclipse.actf.util.logging.StreamErrorLogger
All Implemented Interfaces:
IErrorLogger

public class StreamErrorLogger
extends AbstractErrorLogger

an error logger for logging errors to an java.io.OutputStream

Author:
Mike Squillace

Constructor Summary
StreamErrorLogger(OutputStream stream)
          create an error logger for writing to a stream
 
Method Summary
protected  void finalize()
           
 String getFilename()
          return the filename associated with the stream
 void logError(String msg, Throwable t)
          log an error message along with its corresponding Throwable.
 void setFilename(String name)
          asociate a filename with the underlying stream with which this error logger was instantiated
 String toString()
           
 
Methods inherited from class org.eclipse.actf.util.logging.AbstractErrorLogger
logError, logError
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StreamErrorLogger

public StreamErrorLogger(OutputStream stream)
create an error logger for writing to a stream

Parameters:
stream - - stream to which errors are to be logged
Method Detail

logError

public void logError(String msg,
                     Throwable t)
log an error message along with its corresponding Throwable. If no message is specified, the class and toString() of the Throwable should be logged.

Parameters:
msg - - error message
t - - Throwable being logged

getFilename

public String getFilename()
return the filename associated with the stream

Returns:
filename associated with stream or null if a filename was not set
See Also:
setFilename(String)

setFilename

public void setFilename(String name)
asociate a filename with the underlying stream with which this error logger was instantiated

Parameters:
name - - filename

finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable

toString

public String toString()
Overrides:
toString in class Object