|
IBM WebSphere Application ServerTM Release 8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RepositoryLogRecord
An individual record in the HPEL repository.
Note that both logging requests and tracing requests are represented as RepositoryLogRecords. The java.util.logging package makes no distinction between logging and tracing, and does not differentiate between requests that require localization and those that do not. The RepositoryLogRecord separately keeps track of which requests were successfully localized, and where specified also keeps track of which requests are localizable.
Many of the RepositoryLogRecord's fields are modeled after identically named fields in the java.util.logging.LogRecord class:
getLevel
getLoggerName
getMillis
getParameters
getResourceBundleName
getThreadID
getSourceClassName
getSourceMethodName
getThreadID
The RepositoryLogRecord also keeps track of additional information as explained in the method detail.
Fields related to re-localization:
The RepositoryLogRecord makes re-localization (retranslating a log to another language using an alternate locale's resource bundles) of messages possible by storing the raw message. The localizable field helps improve message formatting efficiency by providing a hint to formatters about which requests localization is required for.
The message locale field is also helpful for re-localization cases as it contains the locale name used during the runtime localization of the localized message, which can be used to verify if the formatted message was already localized in the target locale.
Note that for needs not related to re-localization, the formatted message
is the most useful representation of the message, and mimics the
java.util.logging.LogRecord's
LogRecord.getMessage()
behavior.
Field Summary | |
---|---|
static java.lang.String |
COMPONENT
|
static java.lang.String |
CORRELATIONID
|
static int |
DEFAULT_LOCALIZATION
|
static java.lang.String |
ORBREQUESTID
|
static java.lang.String |
ORGANIZATION
|
static java.lang.String |
PRODUCT
|
static java.lang.String |
PTHREADID
|
static int |
REQUIRES_LOCALIZATION
|
static int |
REQUIRES_NO_LOCALIZATION
|
Method Summary | |
---|---|
java.lang.String |
getExtension(java.lang.String name)
Returns an extended value associated with this record. |
java.util.Map<java.lang.String,java.lang.String> |
getExtensions()
Returns the entire set of extended values associated with this record. |
java.lang.String |
getFormattedMessage()
Returns the formatted version of the record with any place holder parameters substituted with values. |
int |
getLocalizable()
Returns an indicator of whether or not this record is localizable. |
java.lang.String |
getLocalizedMessage()
Returns the localized version of the raw message if localization was attempted and successful. |
java.lang.String |
getLoggerName()
Returns the name of the logger that created this record. |
java.lang.String |
getMessageID()
Returns the IBM Message ID of the record's message. |
java.lang.String |
getMessageLocale()
Returns the locale used for message localization. |
java.lang.Object[] |
getParameters()
Returns values for the positional parameters in the record's message. |
byte[] |
getRawData()
Returns any raw data associated with this record. |
java.lang.String |
getRawMessage()
Returns the raw message text as it was supplied in the call to the logger. |
java.lang.String |
getResourceBundleName()
Returns the resource bundle name associated with this record. |
long |
getSequence()
Returns the sequence index of the message as generated by the logger. |
java.lang.String |
getSourceClassName()
Returns the name of the class that made the call to the logger. |
java.lang.String |
getSourceMethodName()
Returns the name of the method that made the call to the logger. |
java.lang.String |
getStackTrace()
Returns the stack trace if this record was generated due to an exception. |
Methods inherited from interface com.ibm.websphere.logging.hpel.reader.RepositoryLogRecordHeader |
---|
getLevel, getMillis, getRepositoryPointer, getThreadID |
Field Detail |
---|
static final java.lang.String PTHREADID
static final java.lang.String COMPONENT
static final java.lang.String CORRELATIONID
static final java.lang.String ORBREQUESTID
static final java.lang.String ORGANIZATION
static final java.lang.String PRODUCT
static final int DEFAULT_LOCALIZATION
static final int REQUIRES_LOCALIZATION
static final int REQUIRES_NO_LOCALIZATION
Method Detail |
---|
java.lang.String getLoggerName()
LogRecord.getLoggerName()
java.lang.String getMessageID()
The IBM Message ID is the unique identifier of this message across IBM software products. This message ID is the same regardless of what locale the message is rendered in.
For non-message records, and for other messages that do not begin with a
message ID this method returns null
.
null
if there is no message ID.java.lang.String getRawMessage()
java.lang.String getFormattedMessage()
In cases where the localized message is not null, the formatted message is the localized message with any place holder values filled in with corresponding parameter values.
In cases where the localized message is null, the formatted message is the raw message with any place holder values filled in with corresponding parameter values.
This is the same behavior as found in
LogRecord.getMessage()
getRawMessage()
,
getLocalizedMessage()
,
LogRecord.getMessage()
java.lang.String getLocalizedMessage()
In cases where the raw message is localizable, and localization is successful, the localized message is the value looked up from the associated resource bundle in the associated locale using the raw message as the key.
In cases where the raw message is localizable, and localization fails, the localized message is null.
In cases where the raw message is not localizable, the localized message is null.
Note that, in contrast to the formatted message, the localized message does NOT have its place holder values (if any) filled in with parameter values.
null
if no localization
is necessary or localization failed.getMessageLocale()
java.lang.String getMessageLocale()
In cases where the raw message is localizable, and localization is successful, the locale is the locale used by the runtime for localization.
In cases where the raw message is localizable, and localization fails, the locale is null.
In cases where the raw message is not localizable, the locale is null.
null
if localization was
not required for this record or failed at runtime.java.lang.String getResourceBundleName()
Resource bundles typically contain the locale specific version of the raw message.
null
if message
does not require translation.LogRecord.getResourceBundleName()
java.lang.Object[] getParameters()
LogRecord.getParameters()
long getSequence()
java.lang.String getSourceClassName()
LogRecord.getSourceClassName()
java.lang.String getSourceMethodName()
LogRecord.getSourceMethodName()
java.lang.String getStackTrace()
null
if message does not
have a stack trace associated with it.java.util.Map<java.lang.String,java.lang.String> getExtensions()
Extensions may be associated with a record by the logger via the Logger.properties extension mechanism, or may be associated with the record by the logging runtime which uses extensions for other fields (see extension constants).
java.lang.String getExtension(java.lang.String name)
This is effectively returning getExtensions().get(name)
name
- the extension's name.
int getLocalizable()
This field is generally set via the Logger.properties file using the minimum_localization_level attribute. The Logger.properties file is an extension to the java.util.logging API.
The indicator will be one of the following values:
DEFAULT_LOCALIZATION where no information was supplied by the logger as to the localizability of this record.
REQUIRES_LOCALIZATION where the record is localizable.
REQUIRES_NO_LOCALIZATION where the record is not localizable.
byte[] getRawData()
|
IBM WebSphere Application ServerTM Release 8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |