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:
\n
Time, Severity, ThreadName, SourceClassName, SourceMethodName, SourceSimpleClassName, LoggerName, NDC
LogRecord.getParameters()
, default trueMDC 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() |
formatMessage, getHead, getTail
public static final String MULTI_VALUE_DELIMITTER
public static final Set<LogMessageField.NamedLogField> SUPPORTED_FIELDS
public String format(org.jboss.logmanager.ExtLogRecord extLogRecord)
format
in class org.jboss.logmanager.ExtFormatter
public void setFields(String fieldSpec)
public void setAdditionalFields(String spec)
public void setAdditionalFieldTypes(String spec)
public void setMdcFields(String spec)
public void setDynamicMdcFields(String spec)
public void setDynamicMdcFieldTypes(String spec)
public boolean isIncludeLocation()
public void setIncludeLocation(boolean includeLocation)
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 String getExtractStackTrace()
public void setExtractStackTrace(String 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)
public boolean isIncludeLogMessageParameters()
public void setIncludeLogMessageParameters(boolean includeLogMessageParameters)
Copyright © 2013–2023. All rights reserved.