public class LogDataFormatter extends Formatter
This formatter is aimed at using first LogRecord parameter as
"just in time evaluated" extra log information.
Note that localization is still possible (parameters are shifted left if necessary).
In other words :
LogData, this data will be
appended in log message,| Modifier and Type | Field and Description |
|---|---|
static DateFormat |
DATE_FORMAT |
| Constructor and Description |
|---|
LogDataFormatter() |
| Modifier and Type | Method and Description |
|---|---|
void |
addLogDataAppender(LogDataAppender logDataAppender) |
protected StringBuilder |
buildPattern(LogRecord record) |
String |
format(LogRecord record) |
protected void |
formatExtraParameters(StringBuilder outBuffer,
Map<String,Object> extraParameters) |
String |
formatMessage(LogRecord record) |
protected void |
populateExtraParameters(Map<String,Object> extraParameters,
LogRecord logRecord) |
void |
setExtraParametersDelimiter(String startingDelimiter,
String endingDelimiter) |
void |
setPrefix(String prefix) |
public static final DateFormat DATE_FORMAT
public void setExtraParametersDelimiter(String startingDelimiter, String endingDelimiter)
public final void addLogDataAppender(LogDataAppender logDataAppender)
public final void setPrefix(String prefix)
protected void formatExtraParameters(StringBuilder outBuffer, Map<String,Object> extraParameters)
protected void populateExtraParameters(Map<String,Object> extraParameters, LogRecord logRecord)
protected StringBuilder buildPattern(LogRecord record)
public String formatMessage(LogRecord record)
formatMessage in class FormatterCopyright © 2010-2018 Linagora. All Rights Reserved.