com.compomics.util.general
Class DefaultOutputLoggerImplementation

java.lang.Object
  extended by com.compomics.util.general.DefaultOutputLoggerImplementation
All Implemented Interfaces:
Logger

public class DefaultOutputLoggerImplementation
extends java.lang.Object
implements Logger

This class implements a default logger (for debugging purposes).

Author:
Lennart Martens

Constructor Summary
DefaultOutputLoggerImplementation()
          Default constructor.
DefaultOutputLoggerImplementation(java.io.PrintStream aOut, java.io.PrintStream aErr)
          Constructor that takes two PrintStreams to output to.
 
Method Summary
 void logExceptionalEvent(java.lang.String aMessage)
          This method allows the logging of an exceptional event.
 void logNormalEvent(java.lang.String aMessage)
          This method allows the logging of a 'normal' event.
 void logTime(java.lang.String aMessage)
          This method allows the caller to have the logger record a timestamp (implementation specific format and content, although 'date - time' is a good rule of thumb) along with the specified message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultOutputLoggerImplementation

public DefaultOutputLoggerImplementation()
Default constructor. Logs to standard out and standard err.


DefaultOutputLoggerImplementation

public DefaultOutputLoggerImplementation(java.io.PrintStream aOut,
                                         java.io.PrintStream aErr)
Constructor that takes two PrintStreams to output to. One for errors, one for normal and timed messages.

Parameters:
aOut - PrintStream for normal and timed messages.
aErr - PrintStream for error messages.
Method Detail

logTime

public void logTime(java.lang.String aMessage)
This method allows the caller to have the logger record a timestamp (implementation specific format and content, although 'date - time' is a good rule of thumb) along with the specified message.

Specified by:
logTime in interface Logger
Parameters:
aMessage - String with the message to display after the timestamp.

logExceptionalEvent

public void logExceptionalEvent(java.lang.String aMessage)
This method allows the logging of an exceptional event.

Specified by:
logExceptionalEvent in interface Logger
Parameters:
aMessage - String with the exceptional message to log.

logNormalEvent

public void logNormalEvent(java.lang.String aMessage)
This method allows the logging of a 'normal' event.

Specified by:
logNormalEvent in interface Logger
Parameters:
aMessage - String with a normal operation message.


Copyright © 2012. All Rights Reserved.