-
- Type Parameters:
M
- The marker used to mark the message to be logged.
- All Known Subinterfaces:
RuntimeLogger
- All Known Implementing Classes:
RuntimeLoggerImpl
,RuntimeLoggerSingleton
public interface MessageLogger<M>
The message logger is the generic version of theRuntimeLogger
. Instead of being bound to aLogPriority
to mark your log lines, you may use any type as marker.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
log(M aMarker, String aMessage)
Creates a new log message.void
log(M aMarker, String aMessage, Object... aArguments)
Creates a new log message.
-
-
-
Method Detail
-
log
void log(M aMarker, String aMessage)
Creates a new log message.- Parameters:
aMarker
- The marker for the message.aMessage
- The message to be logged.
-
log
void log(M aMarker, String aMessage, Object... aArguments)
Creates a new log message. The placeholders in the messageString
are being replaced by the provided arguments. Implementations of this interface are recommended to use Java'sMessageFormat
's syntax, the placeholder being replaced by the first argument is identified by "{0}" (without the quotes), the second one by "{1}", the third one by "{3}" and so on: Given the message to be "{0} + {1} = {2}" and the three argument be x, y and x + y, then "{0}" is replaced by the value of x, "{1}" is replaced by the value of y and "{2}" is replaced by the value of x + y.- Parameters:
aMarker
- The marker for the message.aMessage
- The message to be logged.aArguments
- The arguments used when replacing the placeholders.
-
-