Class MultipleLoggers
Object
MultipleLoggers
- All Implemented Interfaces:
MessageLogger,StatefulMessageLogger
Logs messages to multiple other loggers.
- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionMultipleLoggers(Stream<StatefulMessageLogger> stream) Creates with a stream of loggers. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.anchoranalysis.core.log.MessageLogger
logEmptyLine
-
Constructor Details
-
MultipleLoggers
Creates with a stream of loggers.- Parameters:
stream- the stream of loggers.
-
-
Method Details
-
start
Description copied from interface:StatefulMessageLoggerStarts logging.This must be called once before any logging occurs.
- Specified by:
startin interfaceStatefulMessageLogger- Throws:
OperationFailedException- if logging cannot be successfully started.
-
log
Description copied from interface:MessageLoggerLogs a message.- Specified by:
login interfaceMessageLogger- Parameters:
message- the message to log.
-
close
public void close(boolean successful, boolean warningOccurred) Description copied from interface:StatefulMessageLoggerStops logging.This must be called once after all logging has occurred.
- Specified by:
closein interfaceStatefulMessageLogger- Parameters:
successful- true when the task completed successfully.warningOccurred- true if at least one warning has occurred, false otherwise.
-
logFormatted
Description copied from interface:MessageLoggerLogs a message, derived from a format-string.- Specified by:
logFormattedin interfaceMessageLogger- Parameters:
formatString- a format string like inString.format(java.lang.String, java.lang.Object...).args- the arguments that match the placeholder informatStringlike inString.format(java.lang.String, java.lang.Object...).
-