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, wait
Methods 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:StatefulMessageLogger
Starts logging.This must be called once before any logging occurs.
- Specified by:
start
in interfaceStatefulMessageLogger
- Throws:
OperationFailedException
- if logging cannot be successfully started.
-
log
Description copied from interface:MessageLogger
Logs a message.- Specified by:
log
in interfaceMessageLogger
- Parameters:
message
- the message to log.
-
close
public void close(boolean successful, boolean warningOccurred) Description copied from interface:StatefulMessageLogger
Stops logging.This must be called once after all logging has occurred.
- Specified by:
close
in 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:MessageLogger
Logs a message, derived from a format-string.- Specified by:
logFormatted
in interfaceMessageLogger
- Parameters:
formatString
- a format string like inString.format(java.lang.String, java.lang.Object...)
.args
- the arguments that match the placeholder informatString
like inString.format(java.lang.String, java.lang.Object...)
.
-