|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.logging.log4j.core.AbstractLifeCycle
org.apache.logging.log4j.core.filter.AbstractFilterable
org.apache.logging.log4j.core.appender.AbstractAppender
com.genesyslab.platform.apptemplate.log4j2plugin.GMessageServerAppender
@Plugin(name="GMessageServer", category="Core", elementType="appender", printObject=true) public final class GMessageServerAppender
Log4j v2.x appender plug-in for sending LMS event logs to Genesys Message Server.
In usual scenarios this plug-in is used internally by the Application Template AB Log4j2 configuration classes. It is also possible to use this appender without automatic logging configuration by the AppTemplate.
<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>
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.logging.log4j.core.LifeCycle |
---|
org.apache.logging.log4j.core.LifeCycle.State |
Field Summary | |
---|---|
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 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
|
Fields inherited from class org.apache.logging.log4j.core.AbstractLifeCycle |
---|
LOGGER |
Method Summary | |
---|---|
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. |
Methods inherited from class org.apache.logging.log4j.core.appender.AbstractAppender |
---|
error, error, error, getHandler, getLayout, getName, ignoreExceptions, parseInt, setHandler, toString |
Methods inherited from class org.apache.logging.log4j.core.filter.AbstractFilterable |
---|
addFilter, getFilter, hasFilter, isFiltered, removeFilter |
Methods inherited from class org.apache.logging.log4j.core.AbstractLifeCycle |
---|
equalsImpl, getState, hashCodeImpl, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.logging.log4j.core.LifeCycle |
---|
getState, isStarted, isStopped |
Field Detail |
---|
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 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
Method Detail |
---|
public void setupDeliveryManager(GMessageServerDeliveryManager newDeliveryManager)
public GMessageServerDeliveryManager getCurrentDeliveryManager()
@PluginFactory public static GMessageServerAppender createAppender(@PluginAttribute(value="name") java.lang.String name, @PluginAttribute(value="host") java.lang.String host, @PluginAttribute(value="port") java.lang.Integer port, @PluginAttribute(value="backupHost") java.lang.String backupHost, @PluginAttribute(value="backupPort") java.lang.Integer backupPort, @PluginAttribute(value="bufferSize") java.lang.Integer bufferSize, @PluginAttribute(value="ignoreExceptions") java.lang.String ignore, @PluginElement(value="Property") org.apache.logging.log4j.core.config.Property[] properties, @PluginElement(value="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 interface org.apache.logging.log4j.core.LifeCycle
start
in class org.apache.logging.log4j.core.filter.AbstractFilterable
public void stop()
stop
in interface org.apache.logging.log4j.core.LifeCycle
stop
in class org.apache.logging.log4j.core.filter.AbstractFilterable
public void append(org.apache.logging.log4j.core.LogEvent event)
append
in interface org.apache.logging.log4j.core.Appender
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.
|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |