Platform SDK Java 8.5 API Reference

com.genesyslab.platform.apptemplate.log4j2plugin
Class LmsEventLookup

java.lang.Object
  extended by com.genesyslab.platform.apptemplate.log4j2plugin.LmsEventLookup
All Implemented Interfaces:
org.apache.logging.log4j.core.lookup.StrLookup

@Plugin(name="lms",
        category="Lookup")
public class LmsEventLookup
extends java.lang.Object
implements org.apache.logging.log4j.core.lookup.StrLookup

Looks up LMS specific keys from Log4j2LmsMessage or plain Log4j2 message objects.

Usage sample:

 <Appenders>
   <File name="LmsFileAppender" fileName="application.log">
     <MarkerFilter marker="PSDK_LMS_MESSAGE" onMatch="ACCEPT" onMismatch="DENY"/>
     <PatternLayout pattern="%d{HH:mm:ss.SSS} ${lms:id} ${lms:name} ${lms:level} [%t] %msg%n"/>
   </File>
 </Appenders>
Following properties are supported:


Field Summary
protected  java.text.SimpleDateFormat dateFormat
           
protected  java.text.SimpleDateFormat dateFormatUtc
           
static int DEFAULT_EVENT_ID
          "Default" LMS Event ID for log messages going from non-LMS loggers.
This value is equal to 9900 representing identifier of "common debug" event.
It's defined in "common.lms" as:
   9900|DEBUG|GCTI_DEBUG|%s
static java.lang.String DEFAULT_EVENT_NAME
          "Default" LMS Event Name for log messages going from non-LMS loggers.
This value is equal to "GCTI_DEBUG" representing identifier of "common debug" event.
It's defined in "common.lms" as:
   9900|DEBUG|GCTI_DEBUG|%s
static java.lang.String DEFAULT_EVENT_SID
          "Default" LMS Event ID for log messages going from non-LMS loggers.
This value is equal to "09900" representing identifier of "common debug" event.
It's defined in "common.lms" as:
   9900|DEBUG|GCTI_DEBUG|%s
static java.lang.String ERROR_EVENT_SID
          "Error" marker for events with failed recognition of its LMS Event ID.
 
Fields inherited from interface org.apache.logging.log4j.core.lookup.StrLookup
CATEGORY
 
Constructor Summary
LmsEventLookup()
           
 
Method Summary
 java.lang.String lookup(org.apache.logging.log4j.core.LogEvent event, java.lang.String key)
          Looks up the value from Log4j2LmsMessage.
 java.lang.String lookup(java.lang.String key)
          Does nothing (returns null).
protected  java.lang.String lookupCategory(org.apache.logging.log4j.core.LogEvent event)
           
protected  java.lang.String lookupId(org.apache.logging.log4j.core.LogEvent event)
           
protected  java.lang.String lookupLevel(org.apache.logging.log4j.core.LogEvent event)
           
protected  java.lang.String lookupLvl(org.apache.logging.log4j.core.LogEvent event)
           
protected  java.lang.String lookupName(org.apache.logging.log4j.core.LogEvent event)
           
protected  java.lang.String lookupTime(org.apache.logging.log4j.core.LogEvent event, boolean utc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_EVENT_ID

public static final int DEFAULT_EVENT_ID
"Default" LMS Event ID for log messages going from non-LMS loggers.
This value is equal to 9900 representing identifier of "common debug" event.
It's defined in "common.lms" as:
   9900|DEBUG|GCTI_DEBUG|%s

See Also:
Constant Field Values

DEFAULT_EVENT_SID

public static final java.lang.String DEFAULT_EVENT_SID
"Default" LMS Event ID for log messages going from non-LMS loggers.
This value is equal to "09900" representing identifier of "common debug" event.
It's defined in "common.lms" as:
   9900|DEBUG|GCTI_DEBUG|%s

See Also:
Constant Field Values

ERROR_EVENT_SID

public static final java.lang.String ERROR_EVENT_SID
"Error" marker for events with failed recognition of its LMS Event ID.

See Also:
Constant Field Values

DEFAULT_EVENT_NAME

public static final java.lang.String DEFAULT_EVENT_NAME
"Default" LMS Event Name for log messages going from non-LMS loggers.
This value is equal to "GCTI_DEBUG" representing identifier of "common debug" event.
It's defined in "common.lms" as:
   9900|DEBUG|GCTI_DEBUG|%s

See Also:
Constant Field Values

dateFormat

protected final java.text.SimpleDateFormat dateFormat

dateFormatUtc

protected final java.text.SimpleDateFormat dateFormatUtc
Constructor Detail

LmsEventLookup

public LmsEventLookup()
Method Detail

lookup

public java.lang.String lookup(java.lang.String key)
Does nothing (returns null).

Specified by:
lookup in interface org.apache.logging.log4j.core.lookup.StrLookup
Returns:
This implementation returns null.
See Also:
lookup(LogEvent, String)

lookup

public java.lang.String lookup(org.apache.logging.log4j.core.LogEvent event,
                               java.lang.String key)
Looks up the value from Log4j2LmsMessage.

Specified by:
lookup in interface org.apache.logging.log4j.core.lookup.StrLookup
Parameters:
event - The current LogEvent.
key - The key to be looked up.
Returns:
The value associated with the key or null.

lookupLvl

protected java.lang.String lookupLvl(org.apache.logging.log4j.core.LogEvent event)

lookupLevel

protected java.lang.String lookupLevel(org.apache.logging.log4j.core.LogEvent event)

lookupId

protected java.lang.String lookupId(org.apache.logging.log4j.core.LogEvent event)

lookupName

protected java.lang.String lookupName(org.apache.logging.log4j.core.LogEvent event)

lookupCategory

protected java.lang.String lookupCategory(org.apache.logging.log4j.core.LogEvent event)

lookupTime

protected java.lang.String lookupTime(org.apache.logging.log4j.core.LogEvent event,
                                      boolean utc)

Platform SDK Java 8.5 API Reference

Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 8.5.302.00
Copyright © 2006–2017 Genesys Telecommunications Laboratories, Inc. All rights reserved.