|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.digi.config.core.ControlledItemImpl
com.digi.config.util.SystemLogEntry
Defines an entry in the system log. Log entries are compound messages. At a minimum, they include a primary text message. They can optionally include a detail message a severity, and a service ID. Although it is possible for users to create SystemLogEntry's directly, typically users will use the static helper methods found in the SystemLog class. See the SystemLog class for details on how to do logging from a program. When SystemLogEntry objects are created users pass in a msg key. This key is used to look up the primary text from the message property file. The msg key is also used to look up the associated detail text, severity and service ID. The associated field keys are produced by appending the following tags to the primary msg key: _DETAILS - key to the second level detailed text message _SEVERITY - key to the message severity (see below for valid values) _ID - key to the message service id. The associated fields are optional, if they are not found in the message file, then they will default to empty or (in the case of severity ) to the value passed in on the constructor. Here is an example of a message stored in the Message file: MyMsg = My normal parameterized {0} message. MyMsg_DETAILS = My detailed parameterized {0} message that includes all the gory details \nand potential user actions. MyMsg_SEVERITY = 1 MyMsg_ID = common_023 The potential severity values are: 0 DEBUG 1 INFORMATION 2 WARNING 3 ERROR 4 FATAL Detail messages can be multi-line with the \n seperator char delineating lines. See the following classes for more information: SystemLog SystemLogEntry SystemLogCtlr
| Nested Class Summary | |
class |
SystemLogEntry.ExceptionInfo
Contains localized and serializable information about an exception that occured |
| Field Summary | |
static int |
MSG_LEVEL_DEBUG
|
static int |
MSG_LEVEL_ERROR
|
static int |
MSG_LEVEL_FATAL
|
static int |
MSG_LEVEL_INFORMATION
|
static int |
MSG_LEVEL_WARNING
|
| Fields inherited from class com.digi.config.core.ControlledItemImpl |
|
| Fields inherited from interface com.digi.config.core.ControlledItem |
ALTERNATE_SORT_VALUE_KEY, BASE_SORT_VALUE_KEY |
| Constructor Summary | |
SystemLogEntry(java.lang.String msgId,
java.io.Serializable[] msgParams,
java.io.Serializable[] detailedMsgParams,
int severity)
Constructs a SystemLogEntry from a resource message and the specified message parameters. |
|
SystemLogEntry(java.lang.String msgId,
java.io.Serializable[] msgParams,
java.io.Serializable[] detailedMsgParams,
int severity,
java.lang.Throwable t)
Constructs a SystemLogEntry from a resource message and the specified message parameters. |
|
| Method Summary | |
java.util.Calendar |
getCreationTime()
Returns the time the log entry was created |
java.lang.String |
getDetailedMsg()
Returns the localized 2nd level message text for this entry |
SystemLogEntry.ExceptionInfo |
getExceptionInfo()
Returns any associated exception information |
java.lang.String |
getMsg()
Returns the localized primary message text for this entry |
java.lang.String |
getServiceId()
Returns the service ID associated with the log message |
int |
getSeverity()
Returns the severity associated with this entry |
java.lang.String |
getSystemName()
Returns the name of the system the log entry was created on |
boolean |
hasDetailedMsg()
Indicates if there is a detailed messages within this entry |
java.lang.String |
toString()
Return the SystemLogEntry text |
| Methods inherited from class com.digi.config.core.ControlledItemImpl |
compareTo, dump, equals, getAlternateSortValue, getBaseSortValue, getId, getOwningCtlrId, hashCode, isActive, nullSafeCompare, setActive, setAlternateSortValue, setBaseSortValue, setOwningCtlrId |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.digi.config.core.ControlledItem |
compareTo, dump, equals, getAlternateSortValue, getBaseSortValue, getId, getOwningCtlrId, hashCode, isActive, setActive, setAlternateSortValue, setBaseSortValue, setOwningCtlrId |
| Field Detail |
public static final int MSG_LEVEL_DEBUG
public static final int MSG_LEVEL_INFORMATION
public static final int MSG_LEVEL_WARNING
public static final int MSG_LEVEL_ERROR
public static final int MSG_LEVEL_FATAL
| Constructor Detail |
public SystemLogEntry(java.lang.String msgId,
java.io.Serializable[] msgParams,
java.io.Serializable[] detailedMsgParams,
int severity)
throws java.util.MissingResourceException
msgId - The id of the message in the resource bundlemsgParams - The parameters of the messagedetailedMsgParams - The parameters of the optional detailed message.severity - The severity assigned to the entry
public SystemLogEntry(java.lang.String msgId,
java.io.Serializable[] msgParams,
java.io.Serializable[] detailedMsgParams,
int severity,
java.lang.Throwable t)
throws java.util.MissingResourceException
msgId - The id of the message in the resource bundlemsgParams - The parameters of the messagedetailedMsgParams - The parameters of the optional detailed message.severity - The severity assigned to the entryt - the exception info to be attached to the log entry (may be null)| Method Detail |
public java.lang.String getMsg()
public java.lang.String getDetailedMsg()
public int getSeverity()
public boolean hasDetailedMsg()
public java.lang.String toString()
toString in class ControlledItemImplpublic SystemLogEntry.ExceptionInfo getExceptionInfo()
public java.util.Calendar getCreationTime()
public java.lang.String getSystemName()
public java.lang.String getServiceId()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||