|
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.Objectcom.genesyslab.platform.apptemplate.log4j2plugin.LmsEventLookup
@Plugin(name="lms", category="Lookup") public class LmsEventLookup
Looks up LMS specific keys from Log4j2LmsMessage
or plain Log4j2 message objects.
<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:category}
- the LMS event category; Output values look like:
"Application"
, "Alarm"
, or "Audit"
.
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 |
---|
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
Constructor Detail |
---|
public LmsEventLookup()
Method Detail |
---|
public java.lang.String lookup(java.lang.String key)
null
).
lookup
in interface org.apache.logging.log4j.core.lookup.StrLookup
null
.lookup(LogEvent, String)
public java.lang.String lookup(org.apache.logging.log4j.core.LogEvent event, java.lang.String key)
Log4j2LmsMessage
.
lookup
in interface org.apache.logging.log4j.core.lookup.StrLookup
event
- The current LogEvent.key
- The key to be looked up.
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)
|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |