public abstract class SimpleFormat
extends java.lang.Object
All logger implementations must support this format, either by using SimpleFormat
or
by implementing it themselves.
The format string may contain any number of placeholders. A placeholder is simply the string
"{}"; there is no special type-specific syntax as there is in String.format()
. Each
placeholder is substituted with the result of calling toString()
on the corresponding
parameter, in the order that they appear. If there are more placeholders than there are
parameters, or vice versa, the excess ones are ignored.
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
format(java.lang.String format,
java.lang.Object... params)
Substitutes any number of parameters into a format string.
|
static java.lang.String |
format(java.lang.String format,
java.lang.Object param)
Substitutes a single parameter into a format string.
|
static java.lang.String |
format(java.lang.String format,
java.lang.Object param1,
java.lang.Object param2)
Substitutes two parameters into a format string.
|
public static java.lang.String format(java.lang.String format, java.lang.Object param)
format
- the format stringparam
- the parameterpublic static java.lang.String format(java.lang.String format, java.lang.Object param1, java.lang.Object param2)
format
- the format stringparam1
- the first parameterparam2
- the second parameterpublic static java.lang.String format(java.lang.String format, java.lang.Object... params)
format
- the format stringparams
- the parameters