public class WildFlyJsonFormatter
extends org.jboss.logmanager.ExtFormatter
{
"NDC": "ndc message",
"timestamp": "1439319236.722",
"SourceClassName": "biz.paluch.logging.gelf.wildfly.WildFlyGelfLogFormatterTest",
"SourceMethodName": "testDefaults",
"level": "6",
"SourceSimpleClassName": "WildFlyGelfLogFormatterTest",
"facility": "logstash-gelf",
"full_message": "foo bar test log message",
"short_message": "foo bar test log message",
"MySeverity": "INFO",
"LoggerName": "biz.paluch.logging.gelf.wildfly.WildFlyGelfLogFormatterTest",
"Thread": "main",
"MyTime": "2015-08-11 20:53:56,0722"
}
Following parameters are supported/needed:
\nTime, Severity, ThreadName, SourceClassName, SourceMethodName, SourceSimpleClassName, LoggerName, NDCMDC Profiling allows to calculate the runtime from request start up to the time until the log message was generated. You must set one value in the MDC:
Two values are set by the formatter:
| Modifier and Type | Field and Description |
|---|---|
static String |
MULTI_VALUE_DELIMITTER |
static Set<LogMessageField.NamedLogField> |
SUPPORTED_FIELDS |
| Constructor and Description |
|---|
WildFlyJsonFormatter()
Create a new instance of the
WildFlyJsonFormatter. |
| Modifier and Type | Method and Description |
|---|---|
String |
format(org.jboss.logmanager.ExtLogRecord extLogRecord) |
String |
getFacility() |
String |
getLineBreak() |
String |
getOriginHost() |
String |
getTimestampPattern() |
String |
getVersion() |
boolean |
isExtractStackTrace() |
boolean |
isFilterStackTrace() |
boolean |
isIncludeFullMdc() |
boolean |
isMdcProfiling() |
void |
setAdditionalFields(String fieldSpec) |
void |
setDynamicMdcFields(String fieldSpec) |
void |
setExtractStackTrace(boolean extractStacktrace) |
void |
setFacility(String facility) |
void |
setFields(String fieldSpec) |
void |
setFilterStackTrace(boolean filterStackTrace) |
void |
setIncludeFullMdc(boolean includeFullMdc) |
void |
setLineBreak(String lineBreak) |
void |
setMdcFields(String fieldSpec) |
void |
setMdcProfiling(boolean mdcProfiling) |
void |
setOriginHost(String originHost) |
void |
setTimestampPattern(String timestampPattern) |
void |
setVersion(String version) |
formatMessage, getHead, getTailpublic static final String MULTI_VALUE_DELIMITTER
public static final Set<LogMessageField.NamedLogField> SUPPORTED_FIELDS
public WildFlyJsonFormatter()
WildFlyJsonFormatter.public String format(org.jboss.logmanager.ExtLogRecord extLogRecord)
format in class org.jboss.logmanager.ExtFormatterpublic void setFields(String fieldSpec)
public void setAdditionalFields(String fieldSpec)
public void setMdcFields(String fieldSpec)
public void setDynamicMdcFields(String fieldSpec)
public boolean isMdcProfiling()
public void setMdcProfiling(boolean mdcProfiling)
public boolean isIncludeFullMdc()
public void setIncludeFullMdc(boolean includeFullMdc)
public String getOriginHost()
public void setOriginHost(String originHost)
public String getFacility()
public void setFacility(String facility)
public boolean isExtractStackTrace()
public void setExtractStackTrace(boolean extractStacktrace)
public boolean isFilterStackTrace()
public void setFilterStackTrace(boolean filterStackTrace)
public String getTimestampPattern()
public void setTimestampPattern(String timestampPattern)
public String getVersion()
public void setVersion(String version)
public String getLineBreak()
public void setLineBreak(String lineBreak)
Copyright © 2013-2015. All Rights Reserved.