M
- The marker used to mark the message to be logged.RuntimeLogger
RuntimeLoggerImpl
, RuntimeLoggerSingleton
public interface MessageLogger<M>
RuntimeLogger
.
Instead of being bound to a LogPriority
to mark your log lines, you
may use any type as marker.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.
|
void log(M aMarker, String aMessage)
aMarker
- The marker for the message.aMessage
- The message to be logged.void log(M aMarker, String aMessage, Object... aArguments)
String
are being replaced by the
provided arguments. Implementations of this interface are recommended to
use Java's MessageFormat
'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.aMarker
- The marker for the message.aMessage
- The message to be logged.aArguments
- The arguments used when replacing the placeholders.Copyright © 2018. All rights reserved.