public class GelfMessageAssembler extends Object implements HostAndPortProvider
GelfMessage
based on various LogEvent
. A LogEvent
encapsulates log-framework specifics and
exposes commonly used details of log events.Modifier and Type | Field and Description |
---|---|
static String |
FIELD_MESSAGE_PARAM |
static String |
FIELD_STACK_TRACE |
static String |
PROPERTY_USE_POOLING
Deprecated.
|
Constructor and Description |
---|
GelfMessageAssembler() |
@Deprecated public static final String PROPERTY_USE_POOLING
PoolingGelfMessageBuilder.PROPERTY_USE_POOLING
.public static final String FIELD_MESSAGE_PARAM
public static final String FIELD_STACK_TRACE
public void initialize(PropertyProvider propertyProvider)
GelfMessageAssembler
from a property provider.propertyProvider
- property provider to obtain configuration propertiespublic GelfMessage createGelfMessage(LogEvent logEvent)
GelfMessage
.logEvent
- the log eventpublic void addField(MessageField field)
public void addFields(Collection<? extends MessageField> fields)
public String getHost()
getHost
in interface HostAndPortProvider
public void setHost(String host)
public String getOriginHost()
public void setOriginHost(String originHost)
public int getPort()
getPort
in interface HostAndPortProvider
public void setPort(int port)
public String getFacility()
public void setFacility(String facility)
public boolean isExtractStackTrace()
public String getExtractStackTrace()
public void setExtractStackTrace(boolean extractStackTrace)
public void setExtractStackTrace(String value)
public boolean isFilterStackTrace()
public void setFilterStackTrace(boolean filterStackTrace)
public boolean isIncludeLogMessageParameters()
public void setIncludeLogMessageParameters(boolean includeLogMessageParameters)
public boolean isIncludeLocation()
public void setIncludeLocation(boolean includeLocation)
public String getTimestampPattern()
public void setTimestampPattern(String timestampPattern)
public int getMaximumMessageSize()
public void setMaximumMessageSize(int maximumMessageSize)
public String getVersion()
public void setVersion(String version)
Copyright © 2013–2023. All rights reserved.