public class JBoss7GelfLogHandler extends GelfLogHandler
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 Log Appender:
publish(LogRecord)
method is thread-safe and may be called by different threads at any time.gelfMessageAssembler, gelfSender
Constructor and Description |
---|
JBoss7GelfLogHandler() |
Modifier and Type | Method and Description |
---|---|
protected GelfMessage |
createGelfMessage(LogRecord record) |
protected GelfMessageAssembler |
createGelfMessageAssembler() |
protected void |
initializeDefaultFields() |
boolean |
isEnabled() |
boolean |
isIncludeFullMdc() |
boolean |
isLoggable(LogRecord record) |
boolean |
isMdcProfiling() |
void |
publish(LogRecord record) |
void |
setEnabled(boolean enabled)
Manually enable/disable the handler.
|
void |
setIncludeFullMdc(boolean includeFullMdc) |
void |
setMdcProfiling(boolean mdcProfiling) |
close, createGelfSender, flush, getExtractStackTrace, getFacility, getGraylogHost, getGraylogPort, getHost, getMaximumMessageSize, getOriginHost, getPort, getTimestampPattern, getVersion, isFilterStackTrace, isIncludeLocation, isIncludeLogMessageParameters, reportError, setAdditionalFields, setAdditionalFieldTypes, setDynamicMdcFields, setDynamicMdcFieldTypes, setExtractStackTrace, setFacility, setFilterStackTrace, setGraylogHost, setGraylogPort, setHost, setIncludeLocation, setIncludeLogMessageParameters, setMaximumMessageSize, setMdcFields, setOriginHost, setPort, setTimestampPattern, setVersion
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
public boolean isEnabled()
public void setEnabled(boolean enabled)
<custom-handler>
.enabled
- false to disable this handler.protected void initializeDefaultFields()
initializeDefaultFields
in class GelfLogHandler
public boolean isLoggable(LogRecord record)
isLoggable
in class Handler
public void publish(LogRecord record)
publish
in class GelfLogHandler
protected GelfMessageAssembler createGelfMessageAssembler()
createGelfMessageAssembler
in class GelfLogHandler
protected GelfMessage createGelfMessage(LogRecord record)
createGelfMessage
in class GelfLogHandler
public boolean isMdcProfiling()
public void setMdcProfiling(boolean mdcProfiling)
public boolean isIncludeFullMdc()
public void setIncludeFullMdc(boolean includeFullMdc)
Copyright © 2013–2023. All rights reserved.