ILoggerEx
, LmsEventLogger
, ILogger
DirectLmsEventLogger
, JulLmsEventLogger
, Log4j2LmsEventLogger
, Log4jLmsEventLogger
, SimpleLmsEventLogger
, Slf4jLmsEventLogger
public abstract class AbstractLmsEventLogger extends AbstractLogger implements LmsEventLogger
LmsEventLogger
interface.AbstractLogger.Level
Modifier and Type | Field | Description |
---|---|---|
protected static java.lang.String |
CTX_ATTRMAP_PREFIX |
|
protected static java.lang.String |
CTX_LMSATTR_CATEGORY |
|
protected static java.lang.String |
CTX_LMSATTR_ID |
|
protected static java.lang.String |
CTX_LMSATTR_LEVEL |
|
protected static java.lang.String |
CTX_LMSATTR_NAME |
|
protected static java.lang.String |
CTX_LMSATTR_PREFIX |
|
protected static LmsMessageTemplate |
DEFAULT_LMS_EVENT |
|
protected LmsMessageConveyor |
lmsMessages |
|
protected static java.lang.String |
LOG_WRAPPER_FQCN |
|
protected boolean |
printAttributes |
STR_PSDK_LMS_ALARM_MESSAGE_MARKER, STR_PSDK_LMS_MESSAGE_MARKER
Modifier | Constructor | Description |
---|---|---|
protected |
AbstractLmsEventLogger(LmsMessageConveyor imc) |
Modifier and Type | Method | Description |
---|---|---|
void |
debug(LmsMessageTemplate key,
java.lang.Object... args) |
Logs localized LMS event as a debug message.
|
void |
debug(LogCategory category,
LmsMessageTemplate key,
java.lang.Object... args) |
Logs localized LMS event as a debug message.
|
void |
debug(java.lang.Object message) |
Logs a message at the
DEBUG level. |
void |
debug(java.lang.Object message,
java.lang.Throwable e) |
Logs a message at the
DEBUG level including the stack trace of the Throwable
thr passed as parameter. |
void |
debug(java.lang.String message,
java.lang.Object... args) |
Logs formatted debug message with optional arguments.
|
protected abstract void |
doLogEvent(LogCategory category,
AbstractLogger.Level logLevel,
LmsMessageTemplate key,
java.lang.Object... args) |
Logs a localized message.
Specific LmsEventLogger class should implement this method to process log messages. |
void |
error(LmsMessageTemplate key,
java.lang.Object... args) |
Logs localized LMS event as an error message.
|
void |
error(LogCategory category,
LmsMessageTemplate key,
java.lang.Object... args) |
Logs localized LMS event as an error message.
|
void |
error(java.lang.Object message) |
Logs a message at the
ERROR level. |
void |
error(java.lang.Object message,
java.lang.Throwable e) |
Logs a message at the
ERROR level including the stack trace of the Throwable
thr passed as parameter. |
void |
error(java.lang.String message,
java.lang.Object... args) |
Logs a message at the
ERROR level.To format log messages PSDK uses MessageFormat class.Quick examples on the rules of formatting:
|
void |
fatal(LmsMessageTemplate key,
java.lang.Object... args) |
Logs localized LMS event as a fatal error message.
|
void |
fatal(LogCategory category,
LmsMessageTemplate key,
java.lang.Object... args) |
Logs localized LMS event as a fatal error message.
|
void |
fatal(java.lang.String message,
java.lang.Object... args) |
Logs a message at the
FATAL ERROR level.To format log messages PSDK uses MessageFormat class.Quick examples on the rules of formatting:
|
void |
fatalError(LmsMessageTemplate key,
java.lang.Object... args) |
Logs localized LMS event as a fatal error message.
|
void |
fatalError(LogCategory category,
LmsMessageTemplate key,
java.lang.Object... args) |
Logs localized LMS event as a fatal error message.
|
void |
fatalError(java.lang.Object message) |
Logs a message object with the
FATAL ERROR level. |
void |
fatalError(java.lang.Object message,
java.lang.Throwable e) |
Logs a message at the
FATAL ERROR level including the stack trace of the Throwable
thr passed as parameter. |
protected static java.lang.Throwable |
getThrowableArg(java.lang.Object... args) |
Returns the last argument value as
Throwable . |
void |
info(LmsMessageTemplate key,
java.lang.Object... args) |
Logs localized LMS event as an info message.
|
void |
info(LogCategory category,
LmsMessageTemplate key,
java.lang.Object... args) |
Logs localized LMS event as an info message.
|
void |
info(java.lang.Object message) |
Logs a message at the
INFO level. |
void |
info(java.lang.Object message,
java.lang.Throwable e) |
Logs a message at the
INFO level including the stack trace of the Throwable
thr passed as parameter. |
void |
info(java.lang.String message,
java.lang.Object... args) |
Logs a message at the
INFO level.To format log messages PSDK uses MessageFormat class.Quick examples on the rules of formatting:
|
void |
log(int key,
java.lang.Object... args) |
Logs a localized message.
Its usage may look like:
|
void |
log(LmsMessageTemplate key,
java.lang.Object... args) |
Logs a localized message.
Its usage may look like:
|
void |
log(LogCategory category,
int key,
java.lang.Object... args) |
Logs a localized message.
Its usage may look like:
|
void |
log(LogCategory category,
LmsMessageTemplate key,
java.lang.Object... args) |
Logs a localized message.
Its usage may look like:
|
void |
trace(java.lang.String message,
java.lang.Object... args) |
Logs formatted trace message with optional arguments.
|
void |
warn(LmsMessageTemplate key,
java.lang.Object... args) |
Logs localized LMS event as a warning message.
|
void |
warn(LogCategory category,
LmsMessageTemplate key,
java.lang.Object... args) |
Logs localized LMS event as a warning message.
|
void |
warn(java.lang.Object message) |
Logs a message at the
WARNING level. |
void |
warn(java.lang.Object message,
java.lang.Throwable e) |
Logs a message at the
WARNING level including the stack trace of the Throwable
thr passed as parameter. |
void |
warn(java.lang.String message,
java.lang.Object... args) |
Logs a message at the
WARNING level.To format log messages PSDK uses MessageFormat class.Quick examples on the rules of formatting:
|
debugFormat, errorFormat, fatalErrorFormat, formatMessage, infoFormat, log, logArgs, warnFormat
createChildLogger, debugFormat, errorFormat, fatalErrorFormat, infoFormat, isDebug, isError, isFatalError, isInfo, isWarn, warnFormat
protected static final java.lang.String CTX_LMSATTR_ID
protected static final java.lang.String CTX_LMSATTR_NAME
protected static final java.lang.String CTX_LMSATTR_LEVEL
protected static final java.lang.String CTX_LMSATTR_CATEGORY
protected static final java.lang.String CTX_LMSATTR_PREFIX
protected static final java.lang.String CTX_ATTRMAP_PREFIX
protected static final java.lang.String LOG_WRAPPER_FQCN
protected static final LmsMessageTemplate DEFAULT_LMS_EVENT
protected final LmsMessageConveyor lmsMessages
protected final boolean printAttributes
protected AbstractLmsEventLogger(LmsMessageConveyor imc)
public void log(LogCategory category, LmsMessageTemplate key, java.lang.Object... args)
lmsLogger.log(LogCategory.Application, CommonLmsEnum.GCTI_APP_STARTED);
lmsLogger.log(LogCategory.Application, CommonLmsEnum.GCTI_LOAD_RESOURCE, rcName, errCode);
log
in interface LmsEventLogger
category
- the log event category.key
- the key used for localization.args
- optional arguments.public void log(LogCategory category, int key, java.lang.Object... args)
lmsLogger.log(LogCategory.Application, 5060); // CommonLmsEnum.GCTI_APP_STARTED
lmsLogger.log(LogCategory.Application, 2002, rcName, errCode); // CommonLmsEnum.GCTI_LOAD_RESOURCE
log
in interface LmsEventLogger
category
- the log event category.key
- the key used for localization.args
- optional arguments.public void log(LmsMessageTemplate key, java.lang.Object... args)
lmsLogger.log(CommonLmsEnum.GCTI_APP_STARTED);
lmsLogger.log(CommonLmsEnum.GCTI_LOAD_RESOURCE, rcName, errCode);
log
in interface LmsEventLogger
key
- the key used for localization.args
- optional arguments.public void log(int key, java.lang.Object... args)
lmsLogger.log(5060); // CommonLmsEnum.GCTI_APP_STARTED
lmsLogger.log(2002, rcName, errCode); // CommonLmsEnum.GCTI_LOAD_RESOURCE
log
in interface LmsEventLogger
key
- the key used for localization.args
- optional arguments.public void fatalError(java.lang.Object message)
FATAL ERROR
level.
Note: Some of PSDK supported logging frameworks (namely "Slf4J
"
and "java.util.logging
") do not support FATAL ERROR
messages level.Slf4J
logging adapter PSDK marks such messages with "PSDK_FATAL_MESSAGE" marker.java.util.logging
adapter this level is processed as ERROR
(SEVERE
).fatalError
in interface ILogger
fatalError
in class AbstractLogger
message
- the message to log.public void fatalError(java.lang.Object message, java.lang.Throwable e)
FATAL ERROR
level including the stack trace of the Throwable
thr
passed as parameter.
Note: Some of PSDK supported logging frameworks (namely "Slf4J
"
and "java.util.logging
") do not support FATAL ERROR
messages level.Slf4J
logging adapter PSDK marks such messages with "PSDK_FATAL_MESSAGE" marker.java.util.logging
adapter this level is processed as ERROR
(SEVERE
).fatalError
in interface ILogger
fatalError
in class AbstractLogger
message
- the message object to log.e
- the exception to log, including its stack trace.public void fatalError(LmsMessageTemplate key, java.lang.Object... args)
LmsMessageTemplate.getLevel()
) logged with this method.LmsEventLogger
applies LMS localization and pass this call to actual underlying
log system as ".fatal(...)
" method call.fatal
",
but in case of Message Server appender, or Log4j2
GLmsLayout
,
there will be value of LmsMessageTemplate.getLevel()
.fatalError
in interface LmsEventLogger
key
- the key used for localization.args
- optional arguments.public void fatalError(LogCategory category, LmsMessageTemplate key, java.lang.Object... args)
LmsMessageTemplate.getLevel()
) logged with this method.LmsEventLogger
applies LMS localization and pass this call to actual underlying
log system as ".fatal(...)
" method call.fatal
",
but in case of Message Server appender, or Log4j2
GLmsLayout
,
there will be value of LmsMessageTemplate.getLevel()
.fatalError
in interface LmsEventLogger
category
- the log event category.key
- the key used for localization.args
- optional arguments.public void fatal(LmsMessageTemplate key, java.lang.Object... args)
LmsMessageTemplate.getLevel()
) logged with this method.LmsEventLogger
applies LMS localization and pass this call to actual underlying
log system as ".fatal(...)
" method call.fatal
",
but in case of Message Server appender, or Log4j2
GLmsLayout
,
there will be value of LmsMessageTemplate.getLevel()
.fatal
in interface LmsEventLogger
key
- the key used for localization.args
- optional arguments.public void fatal(LogCategory category, LmsMessageTemplate key, java.lang.Object... args)
LmsMessageTemplate.getLevel()
) logged with this method.LmsEventLogger
applies LMS localization and pass this call to actual underlying
log system as ".fatal(...)
" method call.fatal
",
but in case of Message Server appender, or Log4j2
GLmsLayout
,
there will be value of LmsMessageTemplate.getLevel()
.fatal
in interface LmsEventLogger
category
- the log event category.key
- the key used for localization.args
- optional arguments.public void fatal(java.lang.String message, java.lang.Object... args)
FATAL ERROR
level.MessageFormat
class.
log.fatal("Value is ''{0}''", 1);
log.fatal("Value for index: [{0}] = {1}", ind, val);
Note: Some of PSDK supported logging frameworks (namely "Slf4J
"
and "java.util.logging
") do not support FATAL ERROR
messages level.Slf4J
logging adapter PSDK marks such messages with "PSDK_FATAL_MESSAGE" marker.java.util.logging
adapter this level is processed as ERROR
(SEVERE
).public void error(java.lang.Object message)
ERROR
level.error
in interface ILogger
error
in class AbstractLogger
message
- the message object to log.public void error(java.lang.Object message, java.lang.Throwable e)
ERROR
level including the stack trace of the Throwable
thr
passed as parameter.error
in interface ILogger
error
in class AbstractLogger
message
- the message object to log.e
- the exception to log, including its stack trace.public void error(LmsMessageTemplate key, java.lang.Object... args)
LmsMessageTemplate.getLevel()
) logged with this method.LmsEventLogger
applies LMS localization and pass this call to actual underlying
log system as ".error(...)
" method call.error
",
but in case of Message Server appender, or Log4j2
GLmsLayout
,
there will be value of LmsMessageTemplate.getLevel()
.error
in interface LmsEventLogger
key
- the key used for localization.args
- optional arguments.public void error(LogCategory category, LmsMessageTemplate key, java.lang.Object... args)
LmsMessageTemplate.getLevel()
) logged with this method.LmsEventLogger
applies LMS localization and pass this call to actual underlying
log system as ".error(...)
" method call.error
",
but in case of Message Server appender, or Log4j2
GLmsLayout
,
there will be value of LmsMessageTemplate.getLevel()
.error
in interface LmsEventLogger
category
- the log event category.key
- the key used for localization.args
- optional arguments.public void error(java.lang.String message, java.lang.Object... args)
ERROR
level.MessageFormat
class.
log.error("Value is ''{0}''", 1);
log.error("Value for index: [{0}] = {1}", ind, val);
public void warn(java.lang.Object message)
WARNING
level.warn
in interface ILogger
warn
in class AbstractLogger
message
- the message object to log.public void warn(java.lang.Object message, java.lang.Throwable e)
WARNING
level including the stack trace of the Throwable
thr
passed as parameter.warn
in interface ILogger
warn
in class AbstractLogger
message
- the message object to log.e
- the exception to log, including its stack trace.public void warn(LmsMessageTemplate key, java.lang.Object... args)
LmsMessageTemplate.getLevel()
) logged with this method.LmsEventLogger
applies LMS localization and pass this call to actual underlying
log system as ".warn(...)
" method call.warn
",
but in case of Message Server appender, or Log4j2
GLmsLayout
,
there will be value of LmsMessageTemplate.getLevel()
.warn
in interface LmsEventLogger
key
- the key used for localization.args
- optional arguments.public void warn(LogCategory category, LmsMessageTemplate key, java.lang.Object... args)
LmsMessageTemplate.getLevel()
) logged with this method.LmsEventLogger
applies LMS localization and pass this call to actual underlying
log system as ".warn(...)
" method call.warn
",
but in case of Message Server appender, or Log4j2
GLmsLayout
,
there will be value of LmsMessageTemplate.getLevel()
.warn
in interface LmsEventLogger
category
- the log event category.key
- the key used for localization.args
- optional arguments.public void warn(java.lang.String message, java.lang.Object... args)
WARNING
level.MessageFormat
class.
log.warn("Value is ''{0}''", 1);
log.warn("Value for index: [{0}] = {1}", ind, val);
public void info(java.lang.Object message)
INFO
level.info
in interface ILogger
info
in class AbstractLogger
message
- the message object to log.public void info(java.lang.Object message, java.lang.Throwable e)
INFO
level including the stack trace of the Throwable
thr
passed as parameter.info
in interface ILogger
info
in class AbstractLogger
message
- the message object to log.e
- the exception to log, including its stack trace.public void info(LmsMessageTemplate key, java.lang.Object... args)
LmsMessageTemplate.getLevel()
) logged with this method.LmsEventLogger
applies LMS localization and pass this call to actual underlying
log system as ".info(...)
" method call.info
",
but in case of Message Server appender, or Log4j2
GLmsLayout
,
there will be value of LmsMessageTemplate.getLevel()
.info
in interface LmsEventLogger
key
- the key used for localization.args
- optional arguments.public void info(LogCategory category, LmsMessageTemplate key, java.lang.Object... args)
LmsMessageTemplate.getLevel()
) logged with this method.LmsEventLogger
applies LMS localization and pass this call to actual underlying
log system as ".info(...)
" method call.info
",
but in case of Message Server appender, or Log4j2
GLmsLayout
,
there will be value of LmsMessageTemplate.getLevel()
.info
in interface LmsEventLogger
category
- the log event category.key
- the key used for localization.args
- optional arguments.public void info(java.lang.String message, java.lang.Object... args)
INFO
level.MessageFormat
class.
log.info("Value is ''{0}''", 1);
log.info("Value for index: [{0}] = {1}", ind, val);
public void debug(java.lang.Object message)
DEBUG
level.debug
in interface ILogger
debug
in class AbstractLogger
message
- the message object to log.public void debug(java.lang.Object message, java.lang.Throwable e)
DEBUG
level including the stack trace of the Throwable
thr
passed as parameter.debug
in interface ILogger
debug
in class AbstractLogger
message
- the message object to log.e
- the exception to log, including its stack trace.public void debug(LmsMessageTemplate key, java.lang.Object... args)
LmsMessageTemplate.getLevel()
) logged with this method.LmsEventLogger
applies LMS localization and pass this call to actual underlying
log system as ".debug(...)
" method call.debug
",
but in case of Message Server appender, or Log4j2
GLmsLayout
,
there will be value of LmsMessageTemplate.getLevel()
.debug
in interface LmsEventLogger
key
- the key used for localization.args
- optional arguments.public void debug(LogCategory category, LmsMessageTemplate key, java.lang.Object... args)
LmsMessageTemplate.getLevel()
) logged with this method.LmsEventLogger
applies LMS localization and pass this call to actual underlying
log system as ".debug(...)
" method call.debug
",
but in case of Message Server appender, or Log4j2
GLmsLayout
,
there will be value of LmsMessageTemplate.getLevel()
.debug
in interface LmsEventLogger
category
- the log event category.key
- the key used for localization.args
- optional arguments.public void debug(java.lang.String message, java.lang.Object... args)
MessageFormat
class.
log.debug("Value is ''{0}''", 1);
log.debug("Value for index: [{0}] = {1}", ind, val);
public void trace(java.lang.String message, java.lang.Object... args)
MessageFormat
class.
log.trace("Value is ''{0}''", 1);
log.trace("Value for index: [{0}] = {1}", ind, val);
protected abstract void doLogEvent(LogCategory category, AbstractLogger.Level logLevel, LmsMessageTemplate key, java.lang.Object... args)
category
- the log event category.logLevel
- the PSDK log level value.key
- the key used for localization.args
- optional arguments.protected static java.lang.Throwable getThrowableArg(java.lang.Object... args)
Throwable
.args
- arguments of a log request.Throwable
, or null
.Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 9.0.006.00
Copyright © 2006–2019 Genesys Telecommunications Laboratories, Inc. All rights reserved.