Package com.compomics.util.general
Class DefaultOutputLoggerImplementation
java.lang.Object
com.compomics.util.general.DefaultOutputLoggerImplementation
- All Implemented Interfaces:
Logger
This class implements a default logger (for debugging purposes).
- Author:
- Lennart Martens
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.DefaultOutputLoggerImplementation(PrintStream aOut, PrintStream aErr) Constructor that takes two PrintStreams to output to. -
Method Summary
Modifier and TypeMethodDescriptionvoidlogExceptionalEvent(String aMessage) This method allows the logging of an exceptional event.voidlogNormalEvent(String aMessage) This method allows the logging of a 'normal' event.voidThis 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:
logExceptionalEventin interfaceLogger- Parameters:
aMessage- String with the exceptional message to log.
-
logNormalEvent
This method allows the logging of a 'normal' event.- Specified by:
logNormalEventin interfaceLogger- Parameters:
aMessage- String with a normal operation message.
-