com.arjuna.common.util.logging
Interface LogNoi18n


public interface LogNoi18n

Non-internationalised logging interface abstracting the various logging APIs supported by Arjuna CLF. See Logi18n for an internationalised version and for more information.

The five logging levels used by Log are (in order):

  1. debug (the least serious
  2. info
  3. warn
  4. error
  5. fatal (the most serious)
The mapping of these log levels to the concepts used by the underlying logging system is implementation dependent. The implemention should ensure, though, that this ordering behaves as expected.

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.

Version:
$Revision: 2342 $ $Date: 2006-03-30 14:06:17 +0100 (Thu, 30 Mar 2006) $
Author:
Thomas Rischbeck

Method Summary
 void debug(long dl, long vl, long fl, java.lang.Object message)
          Deprecated.  
 void debug(long dl, long vl, long fl, java.lang.String message)
          Log a message with the DEBUG Level and with finer granularity.
 void debug(java.lang.Object message)
          Log a message with DEBUG Level
 void debug(java.lang.String message)
          Log a message with DEBUG Level
 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 error(java.lang.Object message)
          Log a message with ERROR Level
 void error(java.lang.String message)
          Log a message with ERROR Level
 void fatal(java.lang.Object message)
          Log a message with FATAL Level
 void fatal(java.lang.String message)
          Log a message with FATAL Level
 long getDebugLevel()
          Return the finer debug level.
 long getFacilityCode()
          Return the facility code.
 long getVisibilityLevel()
          Return the visibility level.
 void info(java.lang.Object message)
          Log a message with INFO Level
 void info(java.lang.String message)
          Log a message with INFO Level
 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 setVisibilityLevel(long level)
          Set the visibility level.
 void warn(java.lang.Object message)
          Log a message with WARN Level
 void warn(java.lang.String message)
          Log a message with WARN Level
 

Method Detail

isDebugEnabled

boolean isDebugEnabled()
Determine if this logger is enabled for DEBUG messages.

Returns:
True if the logger is enabled for DEBUG, false otherwise

isInfoEnabled

boolean isInfoEnabled()
Determine if this logger is enabled for INFO messages.

Returns:
True if the logger is enabled for INFO, false otherwise

isWarnEnabled

boolean isWarnEnabled()
Determine if this logger is enabled for WARN messages.

Returns:
True if the logger is enabled for WARN, false otherwise

isErrorEnabled

boolean isErrorEnabled()
Determine if this logger is enabled for ERROR messages.

Returns:
True if the logger is enabled for ERROR, false otherwise

isFatalEnabled

boolean isFatalEnabled()
Determine if this logger is enabled for FATAL messages.

Returns:
True if the logger is enabled for FATAL, false otherwise

debug

void debug(java.lang.Object message)
Log a message with DEBUG Level

Parameters:
message - the message to log

debug

void debug(java.lang.String message)
Log a message with DEBUG Level

Parameters:
message - the message to log

info

void info(java.lang.Object message)
Log a message with INFO Level

Parameters:
message - the message to log

info

void info(java.lang.String message)
Log a message with INFO Level

Parameters:
message - the message to log

warn

void warn(java.lang.Object message)
Log a message with WARN Level

Parameters:
message - the message to log

warn

void warn(java.lang.String message)
Log a message with WARN Level

Parameters:
message - the message to log

error

void error(java.lang.Object message)
Log a message with ERROR Level

Parameters:
message - the message to log

error

void error(java.lang.String message)
Log a message with ERROR Level

Parameters:
message - the message to log

fatal

void fatal(java.lang.Object message)
Log a message with FATAL Level

Parameters:
message - the message to log

fatal

void fatal(java.lang.String message)
Log a message with FATAL Level

Parameters:
message - the message to log

debug

void debug(long dl,
           long vl,
           long fl,
           java.lang.Object message)
Deprecated. 

Log a message with the DEBUG Level and with finer granularity. The debug message is sent to the output only if the specified debug level, visibility level, and facility code match those allowed by the logger.

Note: this method does not use i18n. ie, message is directly used for log output.

Parameters:
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 Object
vl - 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 Object
fl - 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 Object
message - The message to log.

debug

void debug(long dl,
           long vl,
           long fl,
           java.lang.String message)
Log a message with the DEBUG Level and with finer granularity. The debug message is sent to the output only if the specified debug level, visibility level, and facility code match those allowed by the logger.

Note: this method does not use i18n. ie, message is directly used for log output.

Parameters:
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 Object
vl - 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 Object
fl - 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 Object
message - The message to log.

setLevels

void setLevels(long dl,
               long vl,
               long fl)
Set the debug level, the visibility level, and the facility code.

Parameters:
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.

getDebugLevel

long getDebugLevel()
Return the finer debug level.

Returns:
The finer debugging level value associated with the logger
See Also:
for possible return values.

setDebugLevel

void setDebugLevel(long level)
Set the debug level as available in the DebugLevel.

Parameters:
level - The finer debugging value
See Also:
for possible values of level.

mergeDebugLevel

void mergeDebugLevel(long level)
Merge the debug level provided with that currently used by the controller.

Parameters:
level - The finer debugging value
See Also:
for possible values of level.

getVisibilityLevel

long getVisibilityLevel()
Return the visibility level.

Returns:
The visibility level value associated with the Logger
See Also:
for possible return values.

setVisibilityLevel

void setVisibilityLevel(long level)
Set the visibility level.

Parameters:
level - The visibility level value
See Also:
for possible values of level.

mergeVisibilityLevel

void mergeVisibilityLevel(long level)
Merge the visibility level provided with that currently used by the Logger.

Parameters:
level - The visibility level value
See Also:
for possible values of level.

getFacilityCode

long getFacilityCode()
Return the facility code.

Returns:
The facility code value associated with the Logger.
See Also:
for possible return values.

setFacilityCode

void setFacilityCode(long level)
Set the facility code.

Parameters:
level - The facility code value
See Also:
for possible values of level.

mergeFacilityCode

void mergeFacilityCode(long level)
Merge the debug level provided with that currently used by the Logger.

Parameters:
level - The visibility level value
See Also:
for possible values of level.

debugAllowed

boolean debugAllowed()
Is it allowed to print finer debugging statements? This method returns true when the following is set:

Returns:
true if the Logger allows full logging

debugAllowed

boolean debugAllowed(long dLevel)
Is it allowed to print finer debugging statements with a given debug level? This method assumes that:

Parameters:
dLevel - The debug finer level to check for.
Returns:
true if the Logger allows logging for the finer debugging value dLevel. i.e., dLevel is either equals or greater than the finer debug level assigned to the Logger.

debugAllowed

boolean debugAllowed(long dLevel,
                     long vLevel)
Is it allowed to print debugging statements? This method assumes
 FacilityCode.FAC_ALL)

Parameters:
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 logger
vLevel - 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
Returns:
true if the logger allows logging for the finer debugging values - dLevel and vLevel

debugAllowed

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?

Parameters:
dLevel - The debug finer level to check for.
vLevel - The debug visibilty level to check for.
fLevel - The facility code level to check for.
Returns:
true if the Logger allows logging for the finer debugging value 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.