Package com.compomics.util.general
Class DefaultOutputLoggerImplementation
java.lang.Object
com.compomics.util.general.DefaultOutputLoggerImplementation
- All Implemented Interfaces:
Logger
public class DefaultOutputLoggerImplementation extends Object implements Logger
This class implements a default logger (for debugging purposes).
- Author:
- Lennart Martens
-
Constructor Summary
Constructors Constructor Description DefaultOutputLoggerImplementation()
Default constructor.DefaultOutputLoggerImplementation(PrintStream aOut, PrintStream aErr)
Constructor that takes two PrintStreams to output to. -
Method Summary
Modifier and Type Method Description void
logExceptionalEvent(String aMessage)
This method allows the logging of an exceptional event.void
logNormalEvent(String aMessage)
This method allows the logging of a 'normal' event.void
logTime(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.
-
Constructor Details
-
DefaultOutputLoggerImplementation
public DefaultOutputLoggerImplementation()Default constructor. Logs to standard out and standard err. -
DefaultOutputLoggerImplementation
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 Details
-
logTime
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. -
logExceptionalEvent
This method allows the logging of an exceptional event.- Specified by:
logExceptionalEvent
in interfaceLogger
- Parameters:
aMessage
- String with the exceptional message to log.
-
logNormalEvent
This method allows the logging of a 'normal' event.- Specified by:
logNormalEvent
in interfaceLogger
- Parameters:
aMessage
- String with a normal operation message.
-