public class MultipleLoggers extends Object implements StatefulMessageLogger
Constructor and Description |
---|
MultipleLoggers(java.util.stream.Stream<StatefulMessageLogger> stream)
Creates with a stream of loggers.
|
Modifier and Type | Method and Description |
---|---|
void |
close(boolean successful,
boolean warningOccurred)
Stops logging.
|
void |
log(String message)
Logs a message.
|
void |
logFormatted(String formatString,
Object... args)
Logs a message, derived from a format-string.
|
void |
start()
Starts logging.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
logEmptyLine
public MultipleLoggers(java.util.stream.Stream<StatefulMessageLogger> stream)
stream
- the stream of loggers.public void start() throws OperationFailedException
StatefulMessageLogger
This must be called once before any logging occurs.
start
in interface StatefulMessageLogger
OperationFailedException
- if logging cannot be successfully started.public void log(String message)
MessageLogger
log
in interface MessageLogger
message
- the message to log.public void close(boolean successful, boolean warningOccurred)
StatefulMessageLogger
This must be called once after all logging has occurred.
close
in interface StatefulMessageLogger
successful
- true when the task completed successfully.warningOccurred
- true if at least one warning has occurred, false otherwise.public void logFormatted(String formatString, Object... args)
MessageLogger
logFormatted
in interface MessageLogger
formatString
- a format string like in String.format(java.lang.String, java.lang.Object...)
.args
- the arguments that match the placeholder in formatString
like in String.format(java.lang.String, java.lang.Object...)
.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.