@Plugin(name="lms",
category="Lookup")
public class LmsEventLookup
extends org.apache.logging.log4j.core.lookup.AbstractLookup
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:${lms:id}
- the LMS event ID; it represents integer number of the event,
for example, in case of "3201|STANDARD|GCTI_LOGIN_EXP|User login expired"
,
it represents five digits string value with leading zeros if its length less than 5 characters -
"03201"
.${lms:name}
- the LMS event Name; it represents name (string ID) of the event,
for example, in case of "3201|STANDARD|GCTI_LOGIN_EXP|User login expired"
,
it represents "GCTI_LOGIN_EXP"
.${lms:level}
- the LMS event level; Output values look like:
"Alarm"
, "Standard"
, "Debug"
, etc.${lms:lvl}
- short value the LMS event level; Output values look like:
"Alr"
, "Std"
, "Dbg"
, etc.${lms:priority}
- the event level; Output values look like:
"alarm"
, "standard"
, "interaction"
, etc for LMS events; and
"fatal"
, "error"
, "warn"
, etc for non-LMS events.
Variants ${lms:PRIORITY}
and ${lms:Priority}
-
for upper case, and camel case vales.${lms:pri}
- the event level short form; Output values look like:
"alr"
, "std"
, "int"
, etc for LMS events; and
"fat"
, "err"
, "wrn"
, etc for non-LMS events.
Variants ${lms:PRI}
and ${lms:Pri}
-
for upper case, and camel case vales.${lms:category}
- the LMS event category; Output values look like:
"Application"
, "Alarm"
, or "Audit"
.${lms:time}
- the log event timestamp.${lms:timeutc}
- the log event timestamp in UTC.Modifier and Type | Field | Description |
---|---|---|
protected java.lang.String[][] |
COMMON_LEVELS_MARKS |
|
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.
|
protected java.lang.String[][] |
LMS_LEVELS_MARKS |
Constructor | Description |
---|---|
LmsEventLookup() |
Modifier and Type | Method | Description |
---|---|---|
java.lang.String |
lookup(java.lang.String key) |
Does nothing (returns
null ). |
java.lang.String |
lookup(org.apache.logging.log4j.core.LogEvent event,
java.lang.String key) |
Looks up the value from
Log4j2LmsMessage . |
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 |
lookupPriority(org.apache.logging.log4j.core.LogEvent event,
java.lang.String[] lLevels,
java.lang.String[] cLevels) |
|
protected java.lang.String |
lookupTime(org.apache.logging.log4j.core.LogEvent event,
boolean utc) |
public static final int DEFAULT_EVENT_ID
9900|DEBUG|GCTI_DEBUG|%s
public static final java.lang.String DEFAULT_EVENT_SID
9900|DEBUG|GCTI_DEBUG|%s
public static final java.lang.String ERROR_EVENT_SID
public static final java.lang.String DEFAULT_EVENT_NAME
9900|DEBUG|GCTI_DEBUG|%s
protected final java.text.SimpleDateFormat dateFormat
protected final java.text.SimpleDateFormat dateFormatUtc
protected java.lang.String[][] COMMON_LEVELS_MARKS
protected java.lang.String[][] LMS_LEVELS_MARKS
public java.lang.String lookup(java.lang.String key)
null
).lookup
in class org.apache.logging.log4j.core.lookup.AbstractLookup
null
.lookup(LogEvent, String)
public java.lang.String lookup(org.apache.logging.log4j.core.LogEvent event, java.lang.String key)
Log4j2LmsMessage
.event
- The current LogEvent.key
- The key to be looked up.protected java.lang.String lookupPriority(org.apache.logging.log4j.core.LogEvent event, java.lang.String[] lLevels, java.lang.String[] cLevels)
protected java.lang.String lookupLvl(org.apache.logging.log4j.core.LogEvent event)
protected java.lang.String lookupLevel(org.apache.logging.log4j.core.LogEvent event)
protected java.lang.String lookupId(org.apache.logging.log4j.core.LogEvent event)
protected java.lang.String lookupName(org.apache.logging.log4j.core.LogEvent event)
protected java.lang.String lookupCategory(org.apache.logging.log4j.core.LogEvent event)
protected java.lang.String lookupTime(org.apache.logging.log4j.core.LogEvent event, boolean utc)
Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 9.0.006.00
Copyright © 2006–2019 Genesys Telecommunications Laboratories, Inc. All rights reserved.