|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.itim.logging.SystemLog
External class that provides an interface for message logging. The supported messages types are INFO, WARNING, and ERROR. The messages will be logged by message key, and the logged messages will be localized using the registered resource bundle. The concept of categories is introduced to support the hierarchical control of the message logging. This class supports Logging toolkit JLOG and Log4j, by default JLOG is used. When JLOG is used, all the message logging goes to the message log file while the debug information goes to the trace file. When Log4j is used, both message logging and debug infomation will go to the same file as specified in the Log4j logging properties. The support for Log4j will be dropped in the next major release and all the deprecated methods and constants will also be removed in the next major release.
Field Summary | |
---|---|
static int |
DEBUG_INFO
Deprecated. SystemLog only supports message logging with type of ERROR, WARNING, or INFO. DEBUG_INFO is mapped to DEBUG_MAX in JLOG. |
static java.lang.String |
ENROLE_BASE_CATEGORY
Base category name also used as default category name. |
static java.lang.String |
ENROLE_SECURITY_CATEGORY
category name specifically defined for security-related message logging. |
static int |
ERROR
Defines an Error message that indicates error events. |
static int |
FATAL_ERROR
Deprecated. Use ERROR instead. |
static int |
INFO
Defines an Information message that highlights the progress of the application. |
static int |
NON_FATAL_ERROR
Deprecated. Use ERROR instead. |
static int |
WARNING
Defines a Warning message that indicates potentially harmful situations. |
Method Summary | |
---|---|
static com.ibm.itim.logging.SystemLog |
getInstance()
Returns an instance of SystemLog, creating a new one if necessary. |
int |
getPriorityLevel(java.lang.Object src)
Accessor method for a category's priority level. |
int |
getPriorityLevel(java.lang.String category)
Accessor method for a category's priority level. |
boolean |
getTraceExceptions()
Deprecated. This method will be removed in the next major release. Exception will always be traced. |
void |
logDebug(java.lang.Object src,
java.lang.Object msg)
Deprecated. This method will be removed in the next major release. Use JLogUtil.getTraceLogger() to get PDLogger , then use PDLogger.text() . |
void |
logDebug(java.lang.Object src,
java.lang.Object msg,
java.lang.Throwable e)
Deprecated. This method will be removed in the next major release. Use JLogUtil.getTraceLogger() to get PDLogger , then use PDLogger.exception() . |
void |
logDebug(java.lang.String category,
java.lang.Object msg)
Deprecated. This method will be removed in the next major release. Use JLogUtil.getTraceLogger() to get PDLogger , then use PDLogger.text() . |
void |
logDebug(java.lang.String category,
java.lang.Object msg,
java.lang.Throwable e)
Deprecated. This method will be removed in the next major release. Use JLogUtil.getTraceLogger() to get PDLogger , then use PDLogger.exception() . |
void |
logError(java.lang.Object src,
java.lang.Object msg)
Log an error message. |
void |
logError(java.lang.Object src,
java.lang.Object msg,
java.lang.Throwable e)
Deprecated. This method will be removed in the next major release. Use logError(Object src, Object msg) instead.
Throwable should be traced instead of logged as part of message. For Throwable tracing, Use JLogUtil.getTraceLogger() to get PDLogger , then use PDLogger.exception() . |
void |
logError(java.lang.Object src,
java.lang.String srcMethod,
java.lang.String key)
Log an error message, by key. |
void |
logError(java.lang.Object src,
java.lang.String srcMethod,
java.lang.String key,
java.lang.Object[] parms)
Log an error message, by key, with an array of run-time parameter. |
void |
logError(java.lang.String category,
java.lang.Object msg)
Log a error message. |
void |
logError(java.lang.String category,
java.lang.Object src,
java.lang.String srcMethod,
java.lang.String key)
Log an error message, by key. |
void |
logError(java.lang.String category,
java.lang.Object src,
java.lang.String srcMethod,
java.lang.String key,
java.lang.Object[] parms)
Log an error message, by key, with an array of run-time parameters. |
void |
logError(java.lang.String category,
java.lang.Object msg,
java.lang.Throwable e)
Deprecated. This method will be removed in the next major release. Use logError(String category, Object msg) instead.
Throwable should be traced instead of logged as part of message. For Throwable tracing, Use JLogUtil.getTraceLogger() to get PDLogger , then use PDLogger.exception() . |
void |
logFatal(java.lang.Object src,
java.lang.Object msg)
Deprecated. This method will be removed in the next major release. FATAL is not a supported severity anymore. Use logError() instead. |
void |
logFatal(java.lang.Object src,
java.lang.Object msg,
java.lang.Throwable e)
Deprecated. This method will be removed in the next major release. FATAL is not a supported severity anymore. Use logError() instead. |
void |
logFatal(java.lang.String category,
java.lang.Object msg)
Deprecated. This method will be removed in the next major release. FATAL is not a supported severity anymore. Use logError() instead. |
void |
logFatal(java.lang.String category,
java.lang.Object msg,
java.lang.Throwable e)
Deprecated. This method will be removed in the next major release. FATAL is not a supported severity anymore. Use logError() instead. |
void |
logInformation(java.lang.Object src,
java.lang.Object msg)
Log an information message. |
void |
logInformation(java.lang.Object src,
java.lang.Object msg,
java.lang.Throwable e)
Deprecated. This method will be removed in the next major release. Use logInformation(Object src, Object msg) instead.
Throwable should be traced instead of logged as part of message. For Throwable tracing, Use JLogUtil.getTraceLogger() to get PDLogger , then use PDLogger.exception() . |
void |
logInformation(java.lang.Object src,
java.lang.String srcMethod,
java.lang.String key)
Log an information message, by key. |
void |
logInformation(java.lang.Object src,
java.lang.String srcMethod,
java.lang.String key,
java.lang.Object[] parms)
Log an information message, by key, with an array of run-time parameters. |
void |
logInformation(java.lang.String category,
java.lang.Object msg)
Log an information message. |
void |
logInformation(java.lang.String category,
java.lang.Object src,
java.lang.String srcMethod,
java.lang.String key)
Log an information message, by key. |
void |
logInformation(java.lang.String category,
java.lang.Object src,
java.lang.String srcMethod,
java.lang.String key,
java.lang.Object[] parms)
Log an information message, by key, with an array of run-time parameters. |
void |
logInformation(java.lang.String category,
java.lang.Object msg,
java.lang.Throwable e)
Deprecated. This method will be removed in the next major release. Use logInformation(String category, Object msg) .
Throwable should be traced instead of logged as part of message. For Throwable tracing, Use JLogUtil.getTraceLogger() to get PDLogger , then use PDLogger.exception() . |
void |
logWarning(java.lang.Object src,
java.lang.Object msg)
Log a warning message. |
void |
logWarning(java.lang.Object src,
java.lang.Object msg,
java.lang.Throwable e)
Deprecated. This method will be removed in the next major release. Use logWarning(Object src, Object msg) instead.
Throwable should be traced instead of logged as part of message. For Throwable tracing, Use JLogUtil.getTraceLogger() to get PDLogger , then use PDLogger.exception() . |
void |
logWarning(java.lang.Object src,
java.lang.String srcMethod,
java.lang.String key)
Log a warning message, by key. |
void |
logWarning(java.lang.Object src,
java.lang.String srcMethod,
java.lang.String key,
java.lang.Object[] parms)
Log a warning message, by key, with an array of run-time parameters. |
void |
logWarning(java.lang.String category,
java.lang.Object msg)
Log a warning message. |
void |
logWarning(java.lang.String category,
java.lang.Object src,
java.lang.String srcMethod,
java.lang.String key)
Log a warning message, by key. |
void |
logWarning(java.lang.String category,
java.lang.Object src,
java.lang.String srcMethod,
java.lang.String key,
java.lang.Object[] parms)
Log a warning message, by key, with an array of run-time parameter. |
void |
logWarning(java.lang.String category,
java.lang.Object msg,
java.lang.Throwable e)
Deprecated. This method will be removed in the next major release. Use logWarning(String category, Object msg) instead.
Throwable should be traced instead of logged as part of message. For Throwable tracing, Use JLogUtil.getTraceLogger() to get PDLogger , then use PDLogger.exception() . |
void |
setPriorityLevel(java.lang.Object src,
int priority)
Mutator method for a category's priority level. |
void |
setPriorityLevel(java.lang.String category,
int priority)
Mutator method for a category's priority level. |
void |
setTraceExceptions(boolean traceExceptions)
Deprecated. This method will be removed in the next major release. Exception will always be traced. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String ENROLE_BASE_CATEGORY
public static final java.lang.String ENROLE_SECURITY_CATEGORY
public static final int FATAL_ERROR
public static final int NON_FATAL_ERROR
public static final int ERROR
public static final int WARNING
public static final int INFO
public static final int DEBUG_INFO
Method Detail |
public static com.ibm.itim.logging.SystemLog getInstance()
public void logDebug(java.lang.Object src, java.lang.Object msg)
JLogUtil.getTraceLogger()
to get PDLogger
, then use PDLogger.text()
.
src
- The source object reference. The source object is the object which generates this logging.
You can pass in "this" object reference, or the full class name.msg
- String containing message to be logged.public void logDebug(java.lang.Object src, java.lang.Object msg, java.lang.Throwable e)
JLogUtil.getTraceLogger()
to get PDLogger
, then use PDLogger.exception()
.
src
- The source object reference. The source object is the object which generates this logging.
You can pass in "this" object reference, or the full class name.msg
- String containing message to be logged.e
- Optional throwable object reference. If this parameter
is not null then a stack trace is written to the log.public void logDebug(java.lang.String category, java.lang.Object msg)
JLogUtil.getTraceLogger()
to get PDLogger
, then use PDLogger.text()
.
category
- A dot separated category name.msg
- String containing message to be logged.public void logDebug(java.lang.String category, java.lang.Object msg, java.lang.Throwable e)
JLogUtil.getTraceLogger()
to get PDLogger
, then use PDLogger.exception()
.
category
- A dot separated category name.msg
- String containing message to be logged.e
- Optional throwable object reference. If this parameter
is not null then a stack trace is written to the log.public void logInformation(java.lang.Object src, java.lang.Object msg)
logInformation(Object src, String srcMethod, String key)
instead.
src
- The source object reference. The source object is the object which generates this logging.
You can pass in "this" object reference, or the full class name.msg
- String containing message to be logged.public void logInformation(java.lang.Object src, java.lang.Object msg, java.lang.Throwable e)
logInformation(Object src, Object msg)
instead.
Throwable should be traced instead of logged as part of message. For Throwable tracing, Use JLogUtil.getTraceLogger()
to get PDLogger
, then use PDLogger.exception()
.
src
- The source object reference. The source object is the object which generates this logging.
You can pass in "this" object reference, or the full class name.msg
- String containing message to be logged.e
- Optional throwable object reference. If this parameter
is not null then a stack trace is written to the log.public void logInformation(java.lang.Object src, java.lang.String srcMethod, java.lang.String key)
src
- The source object reference. The source object is the object which generates this logging.
You can pass in "this" object reference, or the full class name.srcMethod
- Name of the method which generates this logging.key
- Message key in the resource bundle.public void logInformation(java.lang.Object src, java.lang.String srcMethod, java.lang.String key, java.lang.Object[] parms)
src
- The source object reference. The source object is the object which generates this logging.
You can pass in "this" object reference, or the full class name.srcMethod
- Name of the method which generates this logging.key
- Message key in the resource bundle.parms
- An array of parameters to be inserted into the message.public void logInformation(java.lang.String category, java.lang.Object msg)
logInformation(String category, Object src, String srcMethod, String key)
instead.
category
- A dot separated category name.msg
- String containing message to be logged.public void logInformation(java.lang.String category, java.lang.Object msg, java.lang.Throwable e)
logInformation(String category, Object msg)
.
Throwable should be traced instead of logged as part of message. For Throwable tracing, Use JLogUtil.getTraceLogger()
to get PDLogger
, then use PDLogger.exception()
.
category
- A dot separated category name.msg
- String containing message to be logged.e
- Optional throwable object reference. If this parameter
is not null then a stack trace is written to the log.public void logInformation(java.lang.String category, java.lang.Object src, java.lang.String srcMethod, java.lang.String key)
category
- A dot separated category name.src
- The source object reference. The source object is the object which generates this logging.
You can pass in "this" object reference, or the full class name.srcMethod
- Name of the method which generates this logging.key
- Message key in the resource bundle.public void logInformation(java.lang.String category, java.lang.Object src, java.lang.String srcMethod, java.lang.String key, java.lang.Object[] parms)
category
- A dot separated category name.src
- The source object reference. The source object is the object which generates this logging.
You can pass in "this" object reference, or the full class name.srcMethod
- Name of the method which generates this logging.key
- Message key in the resource bundle.parms
- An array of parameters to be inserted into the message.public void logWarning(java.lang.Object src, java.lang.Object msg)
logWarning(Object src, String srcMethod, String key)
instead.
src
- The source object reference. The source object is the object which generates this logging.
You can pass in "this" object reference, or the full class name.msg
- String containing message to be logged.public void logWarning(java.lang.Object src, java.lang.Object msg, java.lang.Throwable e)
logWarning(Object src, Object msg)
instead.
Throwable should be traced instead of logged as part of message. For Throwable tracing, Use JLogUtil.getTraceLogger()
to get PDLogger
, then use PDLogger.exception()
.
src
- The source object reference. The source object is the object which generates this logging.
You can pass in "this" object reference, or the full class name.msg
- String containing message to be logged.e
- Optional throwable object reference. If this parameter
is not null then a stack trace is written to the log.public void logWarning(java.lang.Object src, java.lang.String srcMethod, java.lang.String key)
src
- The source object reference. The source object is the object which generates this logging.
You can pass in "this" object reference, or the full class name.srcMethod
- Name of the method which generates this logging.key
- Message key in the resource bundle.public void logWarning(java.lang.Object src, java.lang.String srcMethod, java.lang.String key, java.lang.Object[] parms)
src
- The source object reference. The source object is the object which generates this logging.
You can pass in "this" object reference, or the full class name.srcMethod
- Name of the method which generates this logging.key
- Message key in the resource bundle.parms
- An array of parameters to be inserted into the message.public void logWarning(java.lang.String category, java.lang.Object msg)
logWarning(String category, Object src, String srcMethod, String key)
instead.
category
- A dot separated category name.msg
- String containing message to be logged.public void logWarning(java.lang.String category, java.lang.Object msg, java.lang.Throwable e)
logWarning(String category, Object msg)
instead.
Throwable should be traced instead of logged as part of message. For Throwable tracing, Use JLogUtil.getTraceLogger()
to get PDLogger
, then use PDLogger.exception()
.
category
- A dot separated category name.msg
- String containing message to be logged.e
- Optional throwable object reference. If this parameter
is not null then a stack trace is written to the log.public void logWarning(java.lang.String category, java.lang.Object src, java.lang.String srcMethod, java.lang.String key)
category
- A dot separated category name.src
- The source object reference. The source object is the object which generates this logging.
You can pass in "this" object reference, or the full class name.srcMethod
- Name of the method which generates this logging.key
- Message key in the resource bundle.public void logWarning(java.lang.String category, java.lang.Object src, java.lang.String srcMethod, java.lang.String key, java.lang.Object[] parms)
category
- A dot separated category name.src
- The source object reference. The source object is the object which generates this logging.
You can pass in "this" object reference, or the full class name.srcMethod
- Name of the method which generates this logging.key
- Message key in the resource bundle.parms
- An array of parameters to be inserted into the message.public void logError(java.lang.Object src, java.lang.Object msg)
logError(Object src, String srcMethod, String key)
instead.
src
- The source object reference. The source object is the object which generates this logging.
You can pass in "this" object reference, or the full class name.msg
- String containing message to be logged.public void logError(java.lang.Object src, java.lang.Object msg, java.lang.Throwable e)
logError(Object src, Object msg)
instead.
Throwable should be traced instead of logged as part of message. For Throwable tracing, Use JLogUtil.getTraceLogger()
to get PDLogger
, then use PDLogger.exception()
.
src
- The source object reference. The source object is the object which generates this logging.
You can pass in "this" object reference, or the full class name.msg
- String containing message to be logged.e
- Optional throwable object reference. If this parameter
is not null then a stack trace is written to the log.public void logError(java.lang.Object src, java.lang.String srcMethod, java.lang.String key)
src
- The source object reference. The source object is the object which generates this logging.
You can pass in "this" object reference, or the full class name.srcMethod
- Name of the method which generates this logging.key
- Message key in the resource bundle.public void logError(java.lang.Object src, java.lang.String srcMethod, java.lang.String key, java.lang.Object[] parms)
src
- The source object reference. The source object is the object which generates this logging.
You can pass in "this" object reference, or the full class name.srcMethod
- Name of the method which generates this logging.key
- Message key in the resource bundle.parms
- An array of parameters to be inserted into the message.public void logError(java.lang.String category, java.lang.Object msg)
logError(String category, Object src, String srcMethod, String key)
instead.
category
- A dot separated category name.msg
- String containing message to be logged, which is already Log.public void logError(java.lang.String category, java.lang.Object msg, java.lang.Throwable e)
logError(String category, Object msg)
instead.
Throwable should be traced instead of logged as part of message. For Throwable tracing, Use JLogUtil.getTraceLogger()
to get PDLogger
, then use PDLogger.exception()
.
category
- A dot separated category name.msg
- String containing message to be logged.e
- Optional throwable object reference. If this parameter
is not null then a stack trace is written to the log.public void logError(java.lang.String category, java.lang.Object src, java.lang.String srcMethod, java.lang.String key)
category
- A dot separated category name.src
- The source object reference. The source object is the object which generates this logging.
You can pass in "this" object reference, or the full class name.srcMethod
- Name of the method which generates this logging.key
- Message key in the resource bundle.public void logError(java.lang.String category, java.lang.Object src, java.lang.String srcMethod, java.lang.String key, java.lang.Object[] parms)
category
- A dot separated category name.src
- The source object reference. The source object is the object which generates this logging.
You can pass in "this" object reference, or the full class name.srcMethod
- Name of the method which generates this logging.key
- Message key in the resource bundle.parms
- An array of parameters to be inserted into the message.public void logFatal(java.lang.Object src, java.lang.Object msg)
logError()
instead.
src
- The source object reference. The source object is the object which generates this logging.
You can pass in "this" object reference, or the full class name.msg
- String containing message to be logged.public void logFatal(java.lang.Object src, java.lang.Object msg, java.lang.Throwable e)
logError()
instead.
src
- The source object reference. The source object is the object which generates this logging.
You can pass in "this" object reference, or the full class name.msg
- String containing message to be logged.e
- Optional throwable object reference. If this parameter
is not null then a stack trace is written to the log.public void logFatal(java.lang.String category, java.lang.Object msg)
logError()
instead.
category
- A dot separated category name.msg
- String containing message to be logged.public void logFatal(java.lang.String category, java.lang.Object msg, java.lang.Throwable e)
logError()
instead.
category
- A dot separated category name.msg
- String containing message to be logged.e
- Optional throwable object reference. If this parameter
is not null then a stack trace is written to the log.public int getPriorityLevel(java.lang.Object src)
src
- The source object reference. The source object is the object which generates this logging.
You can pass in "this" object reference, or the full class name.
public int getPriorityLevel(java.lang.String category)
category
- A dot separated category name.
public void setPriorityLevel(java.lang.Object src, int priority)
src
- The source object reference. The source object is the object which generates this logging.
You can pass in "this" object reference, or the full class name.priority
- the priority level to set the specified category to.public void setPriorityLevel(java.lang.String category, int priority)
category
- A dot separated category name.priority
- the priority level to set the specified category to.public void setTraceExceptions(boolean traceExceptions)
traceExceptions
- boolean value indicating whether
stack traces should be logged with exceptions.public boolean getTraceExceptions()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |