|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Logi18n
Internationalised logging interface abstracting the various logging APIs supported by Arjuna CLF.
The five logging levels used by Log
are (in order):
Performance is often a logging concern. By examining the appropriate property, a component can avoid expensive operations (producing information to be logged).
For example,
if (log.isDebugEnabled()) {
... do something expensive ...
log.debug(theResult);
}
Configuration of the underlying logging system will generally be done external to the Logging APIs, through whatever mechanism is supported by that system.
Method Summary | |
---|---|
void |
addResourceBundle(java.lang.String bundleName)
Add the given resource bundle to this logger. |
void |
debug(long dl,
long vl,
long fl,
java.lang.String key)
Log a message with the DEBUG Level and with finer granularity. |
void |
debug(long dl,
long vl,
long fl,
java.lang.String key,
java.lang.Object[] params)
Log a message with the DEBUG Level and with finer granularity and with arguments. |
void |
debug(long dl,
long vl,
long fl,
java.lang.String key,
java.lang.Object[] params,
java.lang.Throwable throwable)
Log a message with the DEBUG Level and with finer granularity, arguments and throwable message. |
void |
debug(long dl,
long vl,
long fl,
java.lang.String key,
java.lang.Throwable throwable)
Log a message with the DEBUG Level and with finer granularity and throwable message. |
void |
debug(java.lang.String key)
Log a message with DEBUG Level |
void |
debug(java.lang.String key,
java.lang.Object[] params)
Log a message with DEBUG Level and with arguments |
void |
debug(java.lang.String key,
java.lang.Object[] params,
java.lang.Throwable throwable)
Log a message with DEBUG Level, with arguments and with a throwable arguments |
void |
debug(java.lang.String key,
java.lang.Throwable throwable)
Log a message with the DEBUG Level and with a throwable arguments |
boolean |
debugAllowed()
Is it allowed to print finer debugging statements? This method returns true when the following is set: finer debug level = DebugLevel.FULL_DEBUGGING .
visibility level = VisibilityLevel.VIS_ALL .
facility code = FacilityCode.FAC_ALL .
|
boolean |
debugAllowed(long dLevel)
Is it allowed to print finer debugging statements with a given debug level? This method assumes that: visibility level = VisibilityLevel.VIS_ALL .
facility code = FacilityCode.FAC_ALL .
|
boolean |
debugAllowed(long dLevel,
long vLevel)
Is it allowed to print debugging statements? This method assumes |
boolean |
debugAllowed(long dLevel,
long vLevel,
long fLevel)
Is it allowed to print finer debugging statements with a given debug level, visibility level and facility code level? |
void |
debugb(java.lang.String baseName,
java.lang.String key)
Deprecated. |
void |
debugb(java.lang.String baseName,
java.lang.String key,
java.lang.Object[] params)
Deprecated. |
void |
debugb(java.lang.String baseName,
java.lang.String key,
java.lang.Object[] params,
java.lang.Throwable throwable)
Deprecated. |
void |
debugb(java.lang.String baseName,
java.lang.String key,
java.lang.Throwable throwable)
Deprecated. |
void |
error(java.lang.String key)
Log a message with the ERROR Level |
void |
error(java.lang.String key,
java.lang.Object[] params)
Log a message with the ERROR Level and with arguments |
void |
error(java.lang.String key,
java.lang.Object[] params,
java.lang.Throwable throwable)
Log a message with the ERROR Level, with arguments and with a throwable arguments |
void |
error(java.lang.String key,
java.lang.Throwable throwable)
Log a message with the ERROR Level and with a throwable arguments |
void |
errorb(java.lang.String baseName,
java.lang.String key)
Deprecated. |
void |
errorb(java.lang.String baseName,
java.lang.String key,
java.lang.Object[] params)
Deprecated. |
void |
errorb(java.lang.String baseName,
java.lang.String key,
java.lang.Object[] params,
java.lang.Throwable throwable)
Deprecated. |
void |
errorb(java.lang.String baseName,
java.lang.String key,
java.lang.Throwable throwable)
Deprecated. |
void |
fatal(java.lang.String key)
Log a message with the FATAL Level |
void |
fatal(java.lang.String key,
java.lang.Object[] params)
Log a message with the FATAL Level and with arguments |
void |
fatal(java.lang.String key,
java.lang.Object[] params,
java.lang.Throwable throwable)
Log a message with the FATAL Level, with arguments and with a throwable arguments |
void |
fatal(java.lang.String key,
java.lang.Throwable throwable)
Log a message with the FATAL Level and with a throwable arguments |
void |
fatalb(java.lang.String baseName,
java.lang.String key)
Deprecated. |
void |
fatalb(java.lang.String baseName,
java.lang.String key,
java.lang.Object[] params)
Deprecated. |
void |
fatalb(java.lang.String baseName,
java.lang.String key,
java.lang.Object[] params,
java.lang.Throwable throwable)
Deprecated. |
void |
fatalb(java.lang.String baseName,
java.lang.String key,
java.lang.Throwable throwable)
Deprecated. |
long |
getDebugLevel()
Return the finer debug level. |
long |
getFacilityCode()
Return the facility code. |
java.lang.String |
getString(java.lang.String key)
Obtain a localized message from one of the resource bundles associated with this logger. |
java.lang.String |
getString(java.lang.String key,
java.lang.Object[] params)
Obtain a localized and parameterized message from one of the resource bundles associated with this logger. |
java.lang.String |
getString(java.lang.String base,
java.lang.String key)
Obtain a localized message from one of the resource bundles associated with this logger. |
java.lang.String |
getString(java.lang.String base,
java.lang.String key,
java.lang.Object[] params)
Obtain a localized and parameterized message from the given resource bundle. |
long |
getVisibilityLevel()
Return the visibility level. |
void |
info(java.lang.String key)
Log a message with INFO Level |
void |
info(java.lang.String key,
java.lang.Object[] params)
Log a message with the INFO Level and with arguments |
void |
info(java.lang.String key,
java.lang.Object[] params,
java.lang.Throwable throwable)
Log a message with the INFO Level, with arguments and with a throwable arguments |
void |
info(java.lang.String key,
java.lang.Throwable throwable)
Log a message with the INFO Level and with a throwable arguments |
void |
infob(java.lang.String baseName,
java.lang.String key)
Deprecated. |
void |
infob(java.lang.String baseName,
java.lang.String key,
java.lang.Object[] params)
Deprecated. |
void |
infob(java.lang.String baseName,
java.lang.String key,
java.lang.Object[] params,
java.lang.Throwable throwable)
Deprecated. |
void |
infob(java.lang.String baseName,
java.lang.String key,
java.lang.Throwable throwable)
Deprecated. |
boolean |
isDebugEnabled()
Determine if this logger is enabled for DEBUG messages. |
boolean |
isErrorEnabled()
Determine if this logger is enabled for ERROR messages. |
boolean |
isFatalEnabled()
Determine if this logger is enabled for FATAL messages. |
boolean |
isInfoEnabled()
Determine if this logger is enabled for INFO messages. |
boolean |
isWarnEnabled()
Determine if this logger is enabled for WARN messages. |
void |
mergeDebugLevel(long level)
Merge the debug level provided with that currently used by the controller. |
void |
mergeFacilityCode(long level)
Merge the debug level provided with that currently used by the Logger. |
void |
mergeVisibilityLevel(long level)
Merge the visibility level provided with that currently used by the Logger. |
void |
setDebugLevel(long level)
Set the debug level as available in the DebugLevel . |
void |
setFacilityCode(long level)
Set the facility code. |
void |
setLevels(long dl,
long vl,
long fl)
Set the debug level, the visibility level, and the facility code. |
void |
setResourceBundleName(java.lang.String BaseName)
Set the name of the resource bundle name that the logger will use to retreive national text |
void |
setVisibilityLevel(long level)
Set the visibility level. |
void |
warn(java.lang.String key)
Log a message with the WARN Level |
void |
warn(java.lang.String key,
java.lang.Object[] params)
Log a message with the WARN Level and with arguments |
void |
warn(java.lang.String key,
java.lang.Object[] params,
java.lang.Throwable throwable)
Log a message with the WARN Level, with arguments and with a throwable arguments |
void |
warn(java.lang.String key,
java.lang.Throwable throwable)
Log a message with the WARN Level and with a throwable arguments |
void |
warnb(java.lang.String baseName,
java.lang.String key)
Deprecated. |
void |
warnb(java.lang.String baseName,
java.lang.String key,
java.lang.Object[] params)
Deprecated. |
void |
warnb(java.lang.String baseName,
java.lang.String key,
java.lang.Object[] params,
java.lang.Throwable throwable)
Deprecated. |
void |
warnb(java.lang.String baseName,
java.lang.String key,
java.lang.Throwable throwable)
Deprecated. |
Method Detail |
---|
void addResourceBundle(java.lang.String bundleName)
bundleName
- The name of the resource bundle.boolean isDebugEnabled()
boolean isInfoEnabled()
boolean isWarnEnabled()
boolean isErrorEnabled()
boolean isFatalEnabled()
void debug(java.lang.String key)
key
- resource bundle key for the message to logvoid debug(java.lang.String key, java.lang.Throwable throwable)
key
- resource bundle key for the message to logthrowable
- The Throwable to logvoid debug(java.lang.String key, java.lang.Object[] params)
key
- resource bundle key for the message to logparams
- parameters passed to the messagevoid debug(java.lang.String key, java.lang.Object[] params, java.lang.Throwable throwable)
key
- resource bundle key for the message to logparams
- parameters passed to the messagethrowable
- The Throwable to logvoid info(java.lang.String key)
key
- resource bundle key for the message to logvoid info(java.lang.String key, java.lang.Throwable throwable)
key
- resource bundle key for the message to logthrowable
- Throwable associated to the logging messagevoid info(java.lang.String key, java.lang.Object[] params)
key
- resource bundle key for the message to logparams
- parameters passed to the messagevoid info(java.lang.String key, java.lang.Object[] params, java.lang.Throwable throwable)
key
- resource bundle key for the message to logparams
- parameters passed to the messagethrowable
- Throwable associated with the logging requestvoid warn(java.lang.String key)
key
- resource bundle key for the message to logvoid warn(java.lang.String key, java.lang.Throwable throwable)
key
- resource bundle key for the message to logthrowable
- Throwable associated with the logging requestvoid warn(java.lang.String key, java.lang.Object[] params)
key
- resource bundle key for the message to logparams
- parameters passed to the messagevoid warn(java.lang.String key, java.lang.Object[] params, java.lang.Throwable throwable)
key
- resource bundle key for the message to logparams
- parameters passed to the messagethrowable
- Throwable associated with the logging requestvoid error(java.lang.String key)
key
- resource bundle key for the message to logvoid error(java.lang.String key, java.lang.Throwable throwable)
key
- resource bundle key for the message to logthrowable
- Throwable associated with the logging requestvoid error(java.lang.String key, java.lang.Object[] params)
key
- resource bundle key for the message to logparams
- parameters passed to the messagevoid error(java.lang.String key, java.lang.Object[] params, java.lang.Throwable throwable)
key
- resource bundle key for the message to logparams
- parameters passed to the messagethrowable
- Throwable associated with the logging requestvoid fatal(java.lang.String key)
key
- resource bundle key for the message to logvoid fatal(java.lang.String key, java.lang.Throwable throwable)
key
- resource bundle key for the message to logthrowable
- Throwable associated with the logging requestvoid fatal(java.lang.String key, java.lang.Object[] params)
key
- resource bundle key for the message to logparams
- parameters passed to the messagevoid fatal(java.lang.String key, java.lang.Object[] params, java.lang.Throwable throwable)
key
- resource bundle key for the message to logparams
- parameters passed to the messagethrowable
- Throwable associated with the logging requestvoid setLevels(long dl, long vl, long fl)
dl
- The finer debugging value.
See DebugLevel
for possible values.vl
- The visibility level value.
See VisibilityLevel
for possible values.fl
- The facility code level value.
See FacilityCode
for possible values.long getDebugLevel()
for possible return values.
void setDebugLevel(long level)
DebugLevel
.
level
- The finer debugging valuefor possible values of level
.
void mergeDebugLevel(long level)
level
- The finer debugging valuefor possible values of level
.
long getVisibilityLevel()
for possible return values.
void setVisibilityLevel(long level)
level
- The visibility level valuefor possible values of level
.
void mergeVisibilityLevel(long level)
level
- The visibility level valuefor possible values of level
.
long getFacilityCode()
for possible return values.
void setFacilityCode(long level)
level
- The facility code valuefor possible values of level
.
void mergeFacilityCode(long level)
level
- The visibility level valuefor possible values of level
.
boolean debugAllowed()
DebugLevel.FULL_DEBUGGING
.VisibilityLevel.VIS_ALL
.FacilityCode.FAC_ALL
.
boolean debugAllowed(long dLevel)
VisibilityLevel.VIS_ALL
.FacilityCode.FAC_ALL
.
dLevel
- The debug finer level to check for.
dLevel
.
i.e., dLevel is either equals or greater than the finer debug level assigned to the Logger.boolean debugAllowed(long dLevel, long vLevel)
FacilityCode.FAC_ALL)
dLevel
- The debug finer level. Used to ask if the logger object allows logging for this value.
The answer is yes if dLevel is either equals or greater the debug level assigned to the loggervLevel
- The visibility level. Used to ask if the logger object allows logging for this value.
The answer is yes if vLevel is either equals or greater the visibility level assigned to the logger
boolean debugAllowed(long dLevel, long vLevel, long fLevel)
dLevel
- The debug finer level to check for.vLevel
- The debug visibilty level to check for.fLevel
- The facility code level to check for.
dLevel
,
visibility level vLevel
and facility code level fLevel
.
i.e., dLevel is equal or greater than the finer debug level assigned to the Logger
and vLevel is equal or greater than the visiblity level
and fLevel is equal or greater then the facility code level.void setResourceBundleName(java.lang.String BaseName)
BaseName
- The default resource bundle name the logger uses to retreive messagesvoid debugb(java.lang.String baseName, java.lang.String key)
baseName
- The name of resource bundle to localize messagekey
- The resource bundle key to retrieve a localised stringvoid debugb(java.lang.String baseName, java.lang.String key, java.lang.Throwable throwable)
baseName
- The name of resource bundle to localize messagekey
- The resource bundle key to retrieve a localised stringthrowable
- Throwable associated with the log messagevoid debugb(java.lang.String baseName, java.lang.String key, java.lang.Object[] params)
baseName
- The name of resource bundle to localize messagekey
- The resource bundle key to retrieve a localised stringparams
- parameters passed to the messagevoid debugb(java.lang.String baseName, java.lang.String key, java.lang.Object[] params, java.lang.Throwable throwable)
baseName
- The name of resource bundle to localize messagekey
- The resource bundle key to retrieve a localised stringparams
- parameters passed to the messagethrowable
- Throwable associated with the log messagevoid infob(java.lang.String baseName, java.lang.String key)
baseName
- The name of resource bundle to localize messagekey
- resource bundle key for the message to logvoid infob(java.lang.String baseName, java.lang.String key, java.lang.Throwable throwable)
baseName
- The name of resource bundle to localize messagekey
- resource bundle key for the message to logthrowable
- Throwable associated with the log messagevoid infob(java.lang.String baseName, java.lang.String key, java.lang.Object[] params)
baseName
- The name of resource bundle to localize messagekey
- resource bundle key for the message to logparams
- parameters passed to the messagevoid infob(java.lang.String baseName, java.lang.String key, java.lang.Object[] params, java.lang.Throwable throwable)
baseName
- The name of resource bundle to localize messagekey
- resource bundle key for the message to logparams
- parameters passed to the messagethrowable
- Throwable associated with the log messagevoid warnb(java.lang.String baseName, java.lang.String key)
baseName
- The name of resource bundle to localize messagekey
- resource bundle key for the message to logvoid warnb(java.lang.String baseName, java.lang.String key, java.lang.Throwable throwable)
baseName
- The name of resource bundle to localize messagekey
- resource bundle key for the message to logthrowable
- Throwable associated with the log messagevoid warnb(java.lang.String baseName, java.lang.String key, java.lang.Object[] params)
baseName
- The name of resource bundle to localize messagekey
- resource bundle key for the message to logparams
- parameters passed to the messagevoid warnb(java.lang.String baseName, java.lang.String key, java.lang.Object[] params, java.lang.Throwable throwable)
baseName
- The name of resource bundle to localize messagekey
- resource bundle key for the message to logparams
- parameters passed to the messagethrowable
- Throwable associated with the log messagevoid errorb(java.lang.String baseName, java.lang.String key)
baseName
- The name of resource bundle to localize messagekey
- resource bundle key for the message to logvoid errorb(java.lang.String baseName, java.lang.String key, java.lang.Throwable throwable)
baseName
- The name of resource bundle to localize messagekey
- resource bundle key for the message to logthrowable
- Throwable associated with the log messagevoid errorb(java.lang.String baseName, java.lang.String key, java.lang.Object[] params)
baseName
- The name of resource bundle to localize messagekey
- resource bundle key for the message to logparams
- parameters passed to the messagevoid errorb(java.lang.String baseName, java.lang.String key, java.lang.Object[] params, java.lang.Throwable throwable)
baseName
- The name of resource bundle to localize messagekey
- resource bundle key for the message to logparams
- parameters passed to the messagethrowable
- Throwable associated with the log messagevoid fatalb(java.lang.String baseName, java.lang.String key)
baseName
- The name of resource bundle to localize messagekey
- resource bundle key for the message to logvoid fatalb(java.lang.String baseName, java.lang.String key, java.lang.Throwable throwable)
baseName
- The name of resource bundle to localize messagekey
- resource bundle key for the message to logthrowable
- Throwable associated with the log messagevoid fatalb(java.lang.String baseName, java.lang.String key, java.lang.Object[] params)
baseName
- The name of resource bundle to localize messagekey
- resource bundle key for the message to logparams
- parameters passed to the messagevoid fatalb(java.lang.String baseName, java.lang.String key, java.lang.Object[] params, java.lang.Throwable throwable)
baseName
- The name of resource bundle to localize messagekey
- resource bundle key for the message to logparams
- parameters passed to the messagethrowable
- Throwable associated with the log messagevoid debug(long dl, long vl, long fl, java.lang.String key)
dl
- The debug finer level associated with the log message. That is, the logger object allows
to log only if the DEBUG level is allowed and dl is either equals or greater the debug level assigned to
the logger Objectvl
- The visibility level associated with the log message. That is, the logger object allows
to log only if the DEBUG level is allowed and vl is either equals or greater the visibility level assigned to
the logger Objectfl
- The facility code level associated with the log message. That is, the logger object allows
to log only if the DEBUG level is allowed and fl is either equals or greater the facility code level assigned to
the logger Objectkey
- resource bundle key for the message to logvoid debug(long dl, long vl, long fl, java.lang.String key, java.lang.Throwable throwable)
dl
- The debug finer level associated with the log message. That is, the logger object allows
to log only if the DEBUG level is allowed and dl is either equals or greater the debug level assigned to
the logger Objectvl
- The visibility level associated with the log message. That is, the logger object allows
to log only if the DEBUG level is allowed and vl is either equals or greater the visibility level assigned to
the logger Objectfl
- The facility code level associated with the log message. That is, the logger object allows
to log only if the DEBUG level is allowed and fl is either equals or greater the facility code level assigned to
the logger Objectkey
- resource bundle key for the message to logthrowable
- Throwable associated with the log messagevoid debug(long dl, long vl, long fl, java.lang.String key, java.lang.Object[] params)
dl
- The debug finer level associated with the log message. That is, the logger object allows
to log only if the DEBUG level is allowed and dl is either equals or greater the debug level assigned to
the logger Objectvl
- The visibility level associated with the log message. That is, the logger object allows
to log only if the DEBUG level is allowed and vl is either equals or greater the visibility level assigned to
the logger Objectfl
- The facility code level associated with the log message. That is, the logger object allows
to log only if the DEBUG level is allowed and fl is either equals or greater the facility code level assigned to
the logger Objectkey
- resource bundle key for the message to logparams
- parameters passed to the messagevoid debug(long dl, long vl, long fl, java.lang.String key, java.lang.Object[] params, java.lang.Throwable throwable)
dl
- The debug finer level associated with the log message. That is, the logger object allows
to log only if the DEBUG level is allowed and dl is either equals or greater the debug level assigned to
the logger Objectvl
- The visibility level associated with the log message. That is, the logger object allows
to log only if the DEBUG level is allowed and vl is either equals or greater the visibility level assigned to
the logger Objectfl
- The facility code level associated with the log message. That is, the logger object allows
to log only if the DEBUG level is allowed and fl is either equals or greater the facility code level assigned to
the logger Objectkey
- resource bundle key for the message to logparams
- parameters passed to the messagethrowable
- Throwable associated with the log messagejava.lang.String getString(java.lang.String key)
key
is replaced by its localized
version from the resource bundle.
key
- unique key to identify an entry in the resource bundle.
setResourceBundleName(java.lang.String)
java.lang.String getString(java.lang.String key, java.lang.Object[] params)
key
is searched in the resource
bundle. Next, the resulting pattern is formatted using
MessageFormat.format(String,Object[])
method with the
user supplied object array params
.
key
- unique key to identify an entry in the resource bundle.params
- parameters to fill placeholders (e.g., {0}, {1}) in the resource bundle string.
java.lang.String getString(java.lang.String base, java.lang.String key)
key
is replaced by its localized
version from the resource bundle base
.
base
- resource bundle namekey
- unique key to identify an entry in the resource bundle.
setResourceBundleName(java.lang.String)
java.lang.String getString(java.lang.String base, java.lang.String key, java.lang.Object[] params)
key
is searched in the resource
bundle. Next, the resulting pattern is formatted using
MessageFormat.format(String,Object[])
method with the
user supplied object array params
.
base
- resource bundle namekey
- unique key to identify an entry in the resource bundle.params
- parameters to fill placeholders (e.g., {0}, {1}) in the resource bundle string.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |