@Plugin(name="GMessageServer",
category="Core",
elementType="appender",
printObject=true)
public final class GMessageServerAppender
extends org.apache.logging.log4j.core.appender.AbstractAppender
<Appenders>
<GMessageServer name="MessageServer" host="msgsrvhost" port="3007">
<property name="ClientName">LmsLoggerTest</property>
<property name="ClientType">GenericClient</property>
<property name="ClientId">777</property>
<property name="ClientHost">clienthost</property>
</GMessageServer>
</Appenders>
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
CTX_ATTRMAP_PREFIX |
|
static java.lang.String |
CTX_LMSATTR_CATEGORY |
|
static java.lang.String |
CTX_LMSATTR_ID |
|
static java.lang.String |
CTX_LMSATTR_NAME |
|
static java.lang.String |
CTX_LMSATTR_PREFIX |
|
static int |
DEFAULT_EVENTS_BUFFER_LEN |
|
static java.lang.String |
PROP_INT_MSGS_LEVEL |
|
static org.apache.logging.log4j.Marker |
PSDK_INT_MESSAGE_MARKER |
|
static org.apache.logging.log4j.Marker |
PSDK_LMS_MESSAGE_MARKER |
Every LMS localized message logged by LmsEventLogger will bear this marker.
It allows marker-aware implementations to perform additional processing on localized messages. |
static org.apache.logging.log4j.Marker |
PSDK_MESSAGE_MARKER |
Modifier and Type | Method | Description |
---|---|---|
void |
append(org.apache.logging.log4j.core.LogEvent event) |
This method pushes Log4j events (messages) to the Delivery Manager.
|
static GMessageServerAppender |
createAppender(java.lang.String name,
java.lang.String host,
java.lang.Integer port,
java.lang.String backupHost,
java.lang.Integer backupPort,
java.lang.Integer bufferSize,
java.lang.String ignore,
org.apache.logging.log4j.core.config.Property[] properties,
org.apache.logging.log4j.core.Filter filter) |
Creates a Genesys Message Server Appender.
|
protected void |
doAppendAnyMarker(org.apache.logging.log4j.core.LogEvent event) |
It's an internal branch method of
append(LogEvent) for handling of Log4j messages
bearing non-PSDK Log4j Marker. |
protected void |
doAppendLmsMarker(org.apache.logging.log4j.core.LogEvent event) |
It's an internal branch method of
append(LogEvent) for handling of log events,
which have LMS marker, but are not instances of Log4j2LmsMessage.These log events may be generated by Slf4j implementation LmsEventLogger s,
or produced by some user defined log request. |
protected void |
doAppendLmsMessage(org.apache.logging.log4j.core.LogEvent event) |
It's an internal branch method of
append(LogEvent) for handling of LMS events from Log2j2
implementation of LmsEventLogger s. |
protected void |
doAppendNoMarker(org.apache.logging.log4j.core.LogEvent event) |
It's an internal branch method of
append(LogEvent) for handling of Log4j messages
without any Log4j Marker's. |
protected void |
doAppendPsdkIntMarker(org.apache.logging.log4j.core.LogEvent event) |
It's an internal branch method of
append(LogEvent) for handling of PSDK
internal messages. |
protected void |
doAppendPsdkMarker(org.apache.logging.log4j.core.LogEvent event) |
It's an internal branch method of
append(LogEvent) for handling of log messages from
application using PSDK Commons Logging interface. |
GMessageServerDeliveryManager |
getCurrentDeliveryManager() |
Returns current messages delivery manager.
|
static int |
getGMSLogLevel(org.apache.logging.log4j.Level level) |
Converts Log4j2 log level to Genesys Message Server specific value.
|
void |
setupDeliveryManager(GMessageServerDeliveryManager newDeliveryManager) |
|
void |
start() |
Makes the Filer and the Delivery Manager ready for use.
|
void |
stop() |
Cleans up the Filter and shuts down the Delivery Manager.
|
error, error, error, getHandler, getLayout, getName, ignoreExceptions, parseInt, requiresLocation, setHandler, toSerializable, toString
addFilter, getFilter, getPropertyArray, hasFilter, isFiltered, removeFilter, stop, stop
equalsImpl, getState, getStatusLogger, hashCodeImpl, initialize, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping, stop
public static final java.lang.String CTX_LMSATTR_ID
public static final java.lang.String CTX_LMSATTR_NAME
public static final java.lang.String CTX_LMSATTR_CATEGORY
public static final java.lang.String CTX_LMSATTR_PREFIX
public static final java.lang.String CTX_ATTRMAP_PREFIX
public static final java.lang.String PROP_INT_MSGS_LEVEL
public static final int DEFAULT_EVENTS_BUFFER_LEN
public static final org.apache.logging.log4j.Marker PSDK_LMS_MESSAGE_MARKER
public static final org.apache.logging.log4j.Marker PSDK_MESSAGE_MARKER
public static final org.apache.logging.log4j.Marker PSDK_INT_MESSAGE_MARKER
public void setupDeliveryManager(GMessageServerDeliveryManager newDeliveryManager)
public GMessageServerDeliveryManager getCurrentDeliveryManager()
@PluginFactory public static GMessageServerAppender createAppender(@PluginAttribute("name") java.lang.String name, @PluginAttribute("host") java.lang.String host, @PluginAttribute("port") java.lang.Integer port, @PluginAttribute("backupHost") java.lang.String backupHost, @PluginAttribute("backupPort") java.lang.Integer backupPort, @PluginAttribute("bufferSize") java.lang.Integer bufferSize, @PluginAttribute("ignoreExceptions") java.lang.String ignore, @PluginElement("Property") org.apache.logging.log4j.core.config.Property[] properties, @PluginElement("Filter") org.apache.logging.log4j.core.Filter filter)
name
- The name of the Appender.host
- Hostname or tcp/ip address of target Message Server.port
- Tcp/ip port number of target Message Server.backupHost
- Hostname or tcp/ip address of Message Server backup.backupPort
- Tcp/ip port number of Message Server backup.bufferSize
- length of the events buffer for caching.ignore
- If "true"
(default) exceptions encountered when appending events are logged; otherwise
they are propagated to the caller.properties
- Properties to pass to the embedded agent.filter
- A Filter to filter events.public void start()
start
in class org.apache.logging.log4j.core.filter.AbstractFilterable
public void stop()
stop
in class org.apache.logging.log4j.core.AbstractLifeCycle
public void append(org.apache.logging.log4j.core.LogEvent event)
event
- the event with log message.protected void doAppendLmsMessage(org.apache.logging.log4j.core.LogEvent event)
append(LogEvent)
for handling of LMS events from Log2j2
implementation of LmsEventLogger
s.event
- the root log event messageprotected void doAppendLmsMarker(org.apache.logging.log4j.core.LogEvent event)
append(LogEvent)
for handling of log events,
which have LMS marker, but are not instances of Log4j2LmsMessage.LmsEventLogger
s,
or produced by some user defined log request.event
- the root log event messageprotected void doAppendPsdkIntMarker(org.apache.logging.log4j.core.LogEvent event)
append(LogEvent)
for handling of PSDK
internal messages.event
- the root log event messageprotected void doAppendPsdkMarker(org.apache.logging.log4j.core.LogEvent event)
append(LogEvent)
for handling of log messages from
application using PSDK Commons Logging interface.event
- the root log event messageprotected void doAppendAnyMarker(org.apache.logging.log4j.core.LogEvent event)
append(LogEvent)
for handling of Log4j messages
bearing non-PSDK Log4j Marker.event
- the root log event messageprotected void doAppendNoMarker(org.apache.logging.log4j.core.LogEvent event)
append(LogEvent)
for handling of Log4j messages
without any Log4j Marker's.event
- the root log event messagepublic static int getGMSLogLevel(org.apache.logging.log4j.Level level)
level
- Log4j2 log message level.Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 9.0.006.00
Copyright © 2006–2019 Genesys Telecommunications Laboratories, Inc. All rights reserved.