com.ibm.itim.logging
Class SystemLog

java.lang.Object
  |
  +--com.ibm.itim.logging.SystemLog

public class SystemLog
extends java.lang.Object

Class that provides an interface for logging any type of message. The concept of categories is made available for potential filtering of messages and/or method of physical storage.


Field Summary
static int DEBUG_INFO
          Debug messages are fine-grained informational events that are most useful to debug an application.
static java.lang.String ENROLE_BASE_CATEGORY
          Base category name also used as default category name.
static java.lang.String ENROLE_SECURITY_CATEGORY
          Base category name also used as default category name.
static int FATAL_ERROR
          Fatal messages are messages that indicate very severe error events that will presumably lead the application to abort.
static int INFO
          Information messages highlight the progress of the application at a coarse-grained level.
static int NON_FATAL_ERROR
          Error messages are messages that indicate error events that might still allow the application to continue running.
static int WARNING
          Warning messages are informational messages that indicate potentially harmful situations.
 
Method Summary
static 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()
          Get accessor for traceExceptions.
 void logDebug(java.lang.Object src, java.lang.Object msg)
          Log a debug message.
 void logDebug(java.lang.Object src, java.lang.Object msg, java.lang.Throwable e)
          Log a debug message.
 void logDebug(java.lang.String category, java.lang.Object msg)
          Log a debug message.
 void logDebug(java.lang.String category, java.lang.Object msg, java.lang.Throwable e)
          Log a debug message.
 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)
          Log an error message.
 void logError(java.lang.String category, java.lang.Object msg)
          Log an error message.
 void logError(java.lang.String category, java.lang.Object msg, java.lang.Throwable e)
          Log an error message.
 void logFatal(java.lang.Object src, java.lang.Object msg)
          Log a fatal message.
 void logFatal(java.lang.Object src, java.lang.Object msg, java.lang.Throwable e)
          Log a fatal message.
 void logFatal(java.lang.String category, java.lang.Object msg)
          Log a fatal message.
 void logFatal(java.lang.String category, java.lang.Object msg, java.lang.Throwable e)
          Log a fatal message.
 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)
          Log an information message.
 void logInformation(java.lang.String category, java.lang.Object msg)
          Log an information message.
 void logInformation(java.lang.String category, java.lang.Object msg, java.lang.Throwable e)
          Log an information message.
 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)
          Log a warning message.
 void logWarning(java.lang.String category, java.lang.Object msg)
          Log a warning message.
 void logWarning(java.lang.String category, java.lang.Object msg, java.lang.Throwable e)
          Log a warning message.
 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)
          Set accessor for traceExceptions.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENROLE_BASE_CATEGORY

public static final java.lang.String ENROLE_BASE_CATEGORY
Base category name also used as default category name.

ENROLE_SECURITY_CATEGORY

public static final java.lang.String ENROLE_SECURITY_CATEGORY
Base category name also used as default category name.

FATAL_ERROR

public static final int FATAL_ERROR
Fatal messages are messages that indicate very severe error events that will presumably lead the application to abort.

NON_FATAL_ERROR

public static final int NON_FATAL_ERROR
Error messages are messages that indicate error events that might still allow the application to continue running.

WARNING

public static final int WARNING
Warning messages are informational messages that indicate potentially harmful situations.

INFO

public static final int INFO
Information messages highlight the progress of the application at a coarse-grained level.

DEBUG_INFO

public static final int DEBUG_INFO
Debug messages are fine-grained informational events that are most useful to debug an application.
Method Detail

getInstance

public static SystemLog getInstance()
Returns an instance of SystemLog, creating a new one if necessary.
Returns:
SystemLog singleton (unique) instance of SystemLog.

logDebug

public void logDebug(java.lang.Object src,
                     java.lang.Object msg)
Log a debug message. Debug messages are fine-grained informational events that are most useful to debug an application.
Parameters:
src - An object reference whose class name is used as a category name.
msg - String containing message to be logged.

logDebug

public void logDebug(java.lang.Object src,
                     java.lang.Object msg,
                     java.lang.Throwable e)
Log a debug message. Debug messages are fine-grained informational events that are most useful to debug an application.
Parameters:
src - An object reference whose class name is used as a 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.

logDebug

public void logDebug(java.lang.String category,
                     java.lang.Object msg)
Log a debug message. Debug messages are fine-grained informational events that are most useful to debug an application.
Parameters:
category - A dot separated category name.
msg - String containing message to be logged.

logDebug

public void logDebug(java.lang.String category,
                     java.lang.Object msg,
                     java.lang.Throwable e)
Log a debug message. Debug messages are fine-grained informational events that are most useful to debug an application.
Parameters:
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.

logInformation

public void logInformation(java.lang.Object src,
                           java.lang.Object msg)
Log an information message. Information messages highlight the progress of the application at a coarse-grained level.
Parameters:
src - An object reference whose class name is used as a category name.
msg - String containing message to be logged.

logInformation

public void logInformation(java.lang.Object src,
                           java.lang.Object msg,
                           java.lang.Throwable e)
Log an information message. Information messages highlight the progress of the application at a coarse-grained level.
Parameters:
src - An object reference whose class name is used as a 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.

logInformation

public void logInformation(java.lang.String category,
                           java.lang.Object msg)
Log an information message. Information messages highlight the progress of the application at a coarse-grained level.
Parameters:
category - A dot separated category name.
msg - String containing message to be logged.

logInformation

public void logInformation(java.lang.String category,
                           java.lang.Object msg,
                           java.lang.Throwable e)
Log an information message. Information messages highlight the progress of the application at a coarse-grained level.
Parameters:
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.

logWarning

public void logWarning(java.lang.Object src,
                       java.lang.Object msg)
Log a warning message. Warning messages are informational messages that indicate potentially harmful situations.
Parameters:
src - An object reference whose class name is used as a category name.
msg - String containing message to be logged.

logWarning

public void logWarning(java.lang.Object src,
                       java.lang.Object msg,
                       java.lang.Throwable e)
Log a warning message. Warning messages are informational messages that indicate potentially harmful situations.
Parameters:
src - An object reference whose class name is used as a 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.

logWarning

public void logWarning(java.lang.String category,
                       java.lang.Object msg)
Log a warning message. Warning messages are informational messages that indicate potentially harmful situations.
Parameters:
category - A dot separated category name.
msg - String containing message to be logged.

logWarning

public void logWarning(java.lang.String category,
                       java.lang.Object msg,
                       java.lang.Throwable e)
Log a warning message. Warning messages are informational messages that indicate potentially harmful situations.
Parameters:
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.

logError

public void logError(java.lang.Object src,
                     java.lang.Object msg)
Log an error message. Error messages are messages that indicate error events that might still allow the application to continue running.
Parameters:
src - An object reference whose class name is used as a category name.
msg - String containing message to be logged.

logError

public void logError(java.lang.Object src,
                     java.lang.Object msg,
                     java.lang.Throwable e)
Log an error message. Error messages are messages that indicate error events that might still allow the application to continue running.
Parameters:
src - An object reference whose class name is used as a 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.

logError

public void logError(java.lang.String category,
                     java.lang.Object msg)
Log an error message. Error messages are messages that indicate error events that might still allow the application to continue running.
Parameters:
category - A dot separated category name.
msg - String containing message to be logged.

logError

public void logError(java.lang.String category,
                     java.lang.Object msg,
                     java.lang.Throwable e)
Log an error message. Error messages are messages that indicate error events that might still allow the application to continue running.
Parameters:
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.

logFatal

public void logFatal(java.lang.Object src,
                     java.lang.Object msg)
Log a fatal message. Fatal messages are messages that indicate very severe error events that will presumably lead the application to abort.
Parameters:
src - An object reference whose class name is used as a category name.
msg - String containing message to be logged.

logFatal

public void logFatal(java.lang.Object src,
                     java.lang.Object msg,
                     java.lang.Throwable e)
Log a fatal message. Fatal messages are messages that indicate very severe error events that will presumably lead the application to abort.
Parameters:
src - An object reference whose class name is used as a 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.

logFatal

public void logFatal(java.lang.String category,
                     java.lang.Object msg)
Log a fatal message. Fatal messages are messages that indicate very severe error events that will presumably lead the application to abort.
Parameters:
category - A dot separated category name.
msg - String containing message to be logged.

logFatal

public void logFatal(java.lang.String category,
                     java.lang.Object msg,
                     java.lang.Throwable e)
Log a fatal message. Fatal messages are messages that indicate very severe error events that will presumably lead the application to abort.
Parameters:
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.

getPriorityLevel

public int getPriorityLevel(java.lang.Object src)
Accessor method for a category's priority level.
Parameters:
src - An object reference whose class name is used as a category name.
Returns:
priority level of specified category.

getPriorityLevel

public int getPriorityLevel(java.lang.String category)
Accessor method for a category's priority level.
Parameters:
category - the category for which to retrieve priority.
Returns:
priority level of specified category.

setPriorityLevel

public void setPriorityLevel(java.lang.Object src,
                             int priority)
Mutator method for a category's priority level. All messages written with priority greater than or equal to the category's priority level will be logged. WARNING: Some log providers ignore category and set the global priority.
Parameters:
src - An object reference whose class name is used as a category name.
priority - the priority level to set the specified category to.

setPriorityLevel

public void setPriorityLevel(java.lang.String category,
                             int priority)
Mutator method for a category's priority level. All messages written with priority greater than or equal to the category's priority level will be logged. WARNING: Some log providers ignore category and set the global priority.
Parameters:
category - the category for which to retrieve priority.
priority - the priority level to set the specified category to.

setTraceExceptions

public void setTraceExceptions(boolean traceExceptions)
Set accessor for traceExceptions. If true, then exceptions will be logged along with stack traces. Otherwise, toString() will be used, but without printStackTrace().
Parameters:
traceExceptions - boolean value indicating whether stack traces should be logged with exceptions.

getTraceExceptions

public boolean getTraceExceptions()
Get accessor for traceExceptions.
Returns:
boolean value of traceExceptions