com.digi.config.util
Class SystemLog

java.lang.Object
  extended bycom.digi.config.util.SystemLog

public class SystemLog
extends java.lang.Object

This is a helper class for logging messages in the Config system. This class includes a variety of logging methods to simplify accessing the system log controller and logging a message. The helper methods in this class create and manage a singleton instance of the SystemLogCtlr. There will be one instance running on each system in the network. Since the helper methods are all static, users do not have to have a reference to the SystemLogCtlr, the static methods grab the singleton instance and use it directly. This class primarily exports simple log methods. For more intricate controller methods use the getSystemLogCtlr() method to access the singleton. For more detailed information on log messages and their use see:

See Also:
SystemLogEntry

Field Summary
(package private) static java.lang.String defaultRBName
           
 
Constructor Summary
SystemLog()
           
 
Method Summary
static SystemLogEntry debug(java.lang.String msg)
          Helper to send a debug message to the system log.
static SystemLogEntry debug(java.lang.String msg, java.lang.Throwable t)
          Helper to send a debug message & associated exception to the system log.
static SystemLogCtlrImpl getSystemLogCtlr()
          Returns the SystemLogCtlr singleton, creating it if necessary.
static SystemLogCtlrImpl getSystemLogCtlr(java.lang.String resourceKey)
          Returns the SystemLogCtlr singleton, creating it if necessary.
static SystemLogEntry log(java.lang.String msgId)
          Helper to send a simple message to the system log.
static SystemLogEntry log(java.lang.String msgId, java.io.Serializable[] msgParams)
          Helper to send a parameterized message to the system log.
static SystemLogEntry log(java.lang.String msgId, java.io.Serializable[] msgParams, java.io.Serializable[] detailMsgParams)
          Helper to send a parameterized message with detailed text to the system log.
static SystemLogEntry log(java.lang.String msgId, java.io.Serializable[] msgParams, java.io.Serializable[] detailMsgParams, int severity)
          Helper to send a parameterized message with detailed text to the system log.
static SystemLogEntry log(java.lang.String msgId, java.io.Serializable[] msgParams, java.io.Serializable[] detailMsgParams, int severity, java.lang.Throwable t)
          Helper to send a parameterized message with detailed text & associated exception to the system log.
static SystemLogEntry log(java.lang.String msgId, java.io.Serializable[] msgParams, java.io.Serializable[] detailMsgParams, java.lang.Throwable t)
          Helper to send a parameterized message & associated exception with detailed text to the system log.
static SystemLogEntry log(java.lang.String msgId, java.io.Serializable[] msgParams, java.lang.Throwable t)
          Helper to send a parameterized message & associated exception to the system log.
static SystemLogEntry log(java.lang.String msgId, java.lang.String msgRbName, java.io.Serializable[] msgParams, java.io.Serializable[] detailMsgParams, int severity, java.lang.Throwable t)
          Helper to send a parameterized message with detailed text to the system log.
static SystemLogEntry log(java.lang.String msgId, java.lang.Throwable t)
          Helper to send a simple message & associated exception to the system log.
static SystemLogEntry log(SystemLogEntry entry)
          Helper to send a SystemLogEntry to the SystemLogCtlr Note that all the other helper methods end up calling this one.
static SystemLogEntry log(java.lang.Throwable t)
          Helper to send an Exception message to the system log.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultRBName

static java.lang.String defaultRBName
Constructor Detail

SystemLog

public SystemLog()
Method Detail

log

public static SystemLogEntry log(java.lang.String msgId)
Helper to send a simple message to the system log. Uses default resource bundle and severity of MSG_LEVEL_INFORMATION. Note: If Severity is specified in the message file using the key of msgId+"_SEVERITY" it will be assigned to the message.

Parameters:
msgId - The Id of the message to send to the log

log

public static SystemLogEntry log(java.lang.String msgId,
                                 java.lang.Throwable t)
Helper to send a simple message & associated exception to the system log. Uses default resource bundle and severity of MSG_LEVEL_ERROR. Note: If Severity is specified in the message file using the key of msgId+"_SEVERITY" it will be assigned to the message.

Parameters:
msgId - The Id of the message to send to the log
t - the error that occured. The exception information will be attached to the log entry.

log

public static SystemLogEntry log(java.lang.String msgId,
                                 java.io.Serializable[] msgParams)
Helper to send a parameterized message to the system log. Uses default resource bundle and severity of MSG_LEVEL_INFORMATION. Note: If Severity is specified in the message file using the key of msgId+"_SEVERITY" it will be assigned to the message.

Parameters:
msgId - The Id of the message to send to the log
msgParams - parameters available for both the message & the detailed message

log

public static SystemLogEntry log(java.lang.String msgId,
                                 java.io.Serializable[] msgParams,
                                 java.lang.Throwable t)
Helper to send a parameterized message & associated exception to the system log. Uses default resource bundle and severity of MSG_LEVEL_ERROR. Note: If Severity is specified in the message file using the key of msgId+"_SEVERITY" it will be assigned to the message.

Parameters:
msgId - The Id of the message to send to the log
msgParams - parameters available for both the message & the detailed message
t - the error that occured. The exception information will be attached to the log entry.

log

public static SystemLogEntry log(java.lang.String msgId,
                                 java.io.Serializable[] msgParams,
                                 java.io.Serializable[] detailMsgParams)
Helper to send a parameterized message with detailed text to the system log. Note: The detailed message is another entry in the message file using the key of msgId+"_DETAIL" Uses default resource bundle and severity of MSG_LEVEL_INFORMATION. Note: If Severity is specified in the message file using the key of msgId+"_SEVERITY" it will be assigned to the message.

Parameters:
msgId - The Id of the message to send to the log
msgParams - parameters for the message
detailMsgParams - parameters for the detailed message

log

public static SystemLogEntry log(java.lang.String msgId,
                                 java.io.Serializable[] msgParams,
                                 java.io.Serializable[] detailMsgParams,
                                 java.lang.Throwable t)
Helper to send a parameterized message & associated exception with detailed text to the system log. Note: The detailed message is another entry in the message file using the key of msgId+"_DETAIL" Uses default resource bundle and severity of MSG_LEVEL_ERROR. Note: If Severity is specified in the message file using the key of msgId+"_SEVERITY" it will be assigned to the message.

Parameters:
msgId - The Id of the message to send to the log
msgParams - parameters for the message
detailMsgParams - parameters for the detailed message
t - the error that occured. The exception information will be attached to the log entry.

log

public static SystemLogEntry log(java.lang.String msgId,
                                 java.io.Serializable[] msgParams,
                                 java.io.Serializable[] detailMsgParams,
                                 int severity)
Helper to send a parameterized message with detailed text to the system log. Note: The detailed message is another entry in the message file using the key of msgId+"_DETAIL" Uses default resource bundle and specified severity. Note: If Severity is specified in the message file using the key of msgId+"_SEVERITY" it will be assigned to the message.

Parameters:
msgId - The Id of the message to send to the log
msgParams - parameters for the message
detailMsgParams - parameters for the detailed message
severity - the severity to assign to this message

log

public static SystemLogEntry log(java.lang.String msgId,
                                 java.io.Serializable[] msgParams,
                                 java.io.Serializable[] detailMsgParams,
                                 int severity,
                                 java.lang.Throwable t)
Helper to send a parameterized message with detailed text & associated exception to the system log. Note: The detailed message is another entry in the message file using the key of msgId+"_DETAIL" Uses default resource bundle and specified severity. Note: If Severity is specified in the message file using the key of msgId+"_SEVERITY" it will be assigned to the message.

Parameters:
msgId - The Id of the message to send to the log
msgParams - parameters for the message
detailMsgParams - parameters for the detailed message
severity - the severity to assign to this message
t - the error that occured. The exception information will be attached to the log entry.

log

public static SystemLogEntry log(java.lang.String msgId,
                                 java.lang.String msgRbName,
                                 java.io.Serializable[] msgParams,
                                 java.io.Serializable[] detailMsgParams,
                                 int severity,
                                 java.lang.Throwable t)
Helper to send a parameterized message with detailed text to the system log. Note: The detailed message is another entry in the message file using the key of msgId+"_DETAIL" Uses specified resource bundle and severity. Note: If Severity is specified in the message file using the key of msgId+"_SEVERITY" it will be assigned to the message.

Parameters:
msgId - The Id of the message to send to the log
msgRbName - The name of the resource bundle to locate the message in
msgParams - parameters for the message
detailMsgParams - parameters for the detailed message
severity - the severity to assign to this message

log

public static SystemLogEntry log(java.lang.Throwable t)
Helper to send an Exception message to the system log. This message will be assigned a severity of MSG_LEVEL_ERROR

Parameters:
t - The exception or throwable to send to the log

log

public static SystemLogEntry log(SystemLogEntry entry)
Helper to send a SystemLogEntry to the SystemLogCtlr Note that all the other helper methods end up calling this one. It in turn looks up the SystemLogCtlr singleton and makes to log call on it.

Parameters:
entry - The entry to send to the system log

debug

public static SystemLogEntry debug(java.lang.String msg)
Helper to send a debug message to the system log. Uses default resource bundle and severity of DEBUG.

Parameters:
msg - The text of the message to include in the debug message.

debug

public static SystemLogEntry debug(java.lang.String msg,
                                   java.lang.Throwable t)
Helper to send a debug message & associated exception to the system log. Uses default resource bundle and severity of DEBUG.

Parameters:
msg - The text of the message to include in the debug message.
t - The exception or throwable to send to the log

getSystemLogCtlr

public static SystemLogCtlrImpl getSystemLogCtlr()
Returns the SystemLogCtlr singleton, creating it if necessary. Assumes a server system log is to be created if it does not exist.


getSystemLogCtlr

public static SystemLogCtlrImpl getSystemLogCtlr(java.lang.String resourceKey)
Returns the SystemLogCtlr singleton, creating it if necessary.

Parameters:
resourceKey - the resource key that defines the name of the system log file


Copyright © 2001-2002 Digi International. All Rights Reserved.