com.ibm.commons.log
Interface LogMgr


public interface LogMgr

Log Manager.

This class is used to defines logger that then delegates to the JDK implementation. Initially (pre JDK 1.4) they were designed to log to different APIs (LOG4J...). Now, they also propose an easier to use API particularly through the use of String formatter using parameters.


Field Summary
static int LOG_ERROR_LEVEL
           
static int LOG_INFO_LEVEL
           
static int LOG_TRACEDEBUG_LEVEL
           
static int LOG_TRACEENTRY_LEVEL
           
static int LOG_TRACEENTRYEXIT_LEVEL
           
static int LOG_TRACEEVENT_LEVEL
           
static int LOG_TRACEEXIT_LEVEL
           
static int LOG_WARN_LEVEL
           
 
Method Summary
 void error(java.lang.String msg, java.lang.Object... parameters)
          Log an error string.
 void error(java.lang.Throwable t, java.lang.String msg, java.lang.Object... parameters)
          Log an error string.
 void errorp(java.lang.Object clazz, java.lang.String method, java.lang.String msg, java.lang.Object... parameters)
          Log an error string.
 void errorp(java.lang.Object clazz, java.lang.String method, java.lang.Throwable t, java.lang.String msg, java.lang.Object... parameters)
          Log an error string.
 java.lang.String getDescription()
          Get the logger description.
 java.util.logging.Logger getLogger()
          Get the underlying Java logger, if any.
 void info(java.lang.String msg, java.lang.Object... parameters)
          Log an information string.
 void info(java.lang.Throwable t, java.lang.String msg, java.lang.Object... parameters)
          Log an information string.
 void infop(java.lang.Object clazz, java.lang.String method, java.lang.String msg, java.lang.Object... parameters)
          Log an information string.
 void infop(java.lang.Object clazz, java.lang.String method, java.lang.Throwable t, java.lang.String msg, java.lang.Object... parameters)
          Log an information string.
 boolean isErrorEnabled()
          Returns whether error level is enabled.
 boolean isInfoEnabled()
          Returns whether info level is enabled.
 boolean isTraceDebugEnabled()
          Returns whether traceDebug level is enables
 boolean isTraceEntryExitEnabled()
          Returns whether traceEntryExit level is enables
 boolean isTraceEventEnabled()
          Returns whether traceEvent level is enables
 boolean isWarnEnabled()
          Returns whether warning level is enabled.
 void setLogLevel(int newLevel)
          Sets the Level for the Logger.
 void traceDebug(java.lang.String msg, java.lang.Object... parameters)
          Trace an event for debug (Level=FINEST).
 void traceDebug(java.lang.Throwable t, java.lang.String msg, java.lang.Object... parameters)
          Trace an event for debug (Level=FINEST).
 void traceDebugp(java.lang.Object clazz, java.lang.String methodName, java.lang.String msg, java.lang.Object... parameters)
          Trace an event for debug (Level=FINEST).
 void traceDebugp(java.lang.Object clazz, java.lang.String methodName, java.lang.Throwable t, java.lang.String msg, java.lang.Object... parameters)
          Trace an event for debug (Level=FINEST).
 void traceEntry(java.lang.Object clazz, java.lang.String methodName)
          Trace when a method is entered.
 void traceEntry(java.lang.Object clazz, java.lang.String methodName, java.lang.Object... parameters)
          Trace when a method is entered.
 void traceEvent(java.lang.String msg, java.lang.Object... parameters)
          Trace an event (Level=FINE).
 void traceEvent(java.lang.Throwable t, java.lang.String msg, java.lang.Object... parameters)
          Trace an event (Level=FINE).
 void traceEventp(java.lang.Object clazz, java.lang.String method, java.lang.String msg, java.lang.Object... parameters)
          Trace an event (Level=FINE).
 void traceEventp(java.lang.Object clazz, java.lang.String method, java.lang.Throwable t, java.lang.String msg, java.lang.Object... parameters)
          Trace an event (Level=FINE).
 void traceExit(java.lang.Object clazz, java.lang.String methodName)
          Trace when a method is exited.
 void traceExit(java.lang.Object clazz, java.lang.String methodName, java.lang.Object ret)
          Trace when a method is exited.
 void warn(java.lang.String msg, java.lang.Object... parameters)
          Log a warning string.
 void warn(java.lang.Throwable t, java.lang.String msg, java.lang.Object... parameters)
          Log a warning string.
 void warnp(java.lang.Object clazz, java.lang.String method, java.lang.String msg, java.lang.Object... parameters)
          Log a warning string.
 void warnp(java.lang.Object clazz, java.lang.String method, java.lang.Throwable t, java.lang.String msg, java.lang.Object... parameters)
          Log a warning string.
 

Field Detail

LOG_ERROR_LEVEL

static final int LOG_ERROR_LEVEL

LOG_WARN_LEVEL

static final int LOG_WARN_LEVEL

LOG_INFO_LEVEL

static final int LOG_INFO_LEVEL

LOG_TRACEDEBUG_LEVEL

static final int LOG_TRACEDEBUG_LEVEL

LOG_TRACEEVENT_LEVEL

static final int LOG_TRACEEVENT_LEVEL

LOG_TRACEENTRY_LEVEL

static final int LOG_TRACEENTRY_LEVEL

LOG_TRACEEXIT_LEVEL

static final int LOG_TRACEEXIT_LEVEL

LOG_TRACEENTRYEXIT_LEVEL

static final int LOG_TRACEENTRYEXIT_LEVEL
Method Detail

getDescription

java.lang.String getDescription()
Get the logger description.


isTraceDebugEnabled

boolean isTraceDebugEnabled()
Returns whether traceDebug level is enables

Returns:
boolean

isTraceEntryExitEnabled

boolean isTraceEntryExitEnabled()
Returns whether traceEntryExit level is enables

Returns:
boolean

isTraceEventEnabled

boolean isTraceEventEnabled()
Returns whether traceEvent level is enables

Returns:
boolean

isInfoEnabled

boolean isInfoEnabled()
Returns whether info level is enabled.

Returns:
boolean

isWarnEnabled

boolean isWarnEnabled()
Returns whether warning level is enabled.

Returns:
boolean

isErrorEnabled

boolean isErrorEnabled()
Returns whether error level is enabled.

Returns:
boolean

setLogLevel

void setLogLevel(int newLevel)
Sets the Level for the Logger.

Parameters:
newLevel -

getLogger

java.util.logging.Logger getLogger()
Get the underlying Java logger, if any.

Returns:

info

void info(java.lang.String msg,
          java.lang.Object... parameters)
Log an information string.

Parameters:
msg - the message to log
parameters - the parameters used to format the message

info

void info(java.lang.Throwable t,
          java.lang.String msg,
          java.lang.Object... parameters)
Log an information string.

Parameters:
t - the exception to log
msg - the message to log
parameters - the parameters used to format the message

infop

void infop(java.lang.Object clazz,
           java.lang.String method,
           java.lang.String msg,
           java.lang.Object... parameters)
Log an information string.

Parameters:
clazz - the object class
method - the method name
msg - the message to log
parameters - the parameters used to format the message

infop

void infop(java.lang.Object clazz,
           java.lang.String method,
           java.lang.Throwable t,
           java.lang.String msg,
           java.lang.Object... parameters)
Log an information string.

Parameters:
clazz - the object class
method - the method name
t - the exception to log
msg - the message to log
parameters - the parameters used to format the message

warn

void warn(java.lang.String msg,
          java.lang.Object... parameters)
Log a warning string.

Parameters:
msg - the message to log
parameters - the parameters used to format the message

warn

void warn(java.lang.Throwable t,
          java.lang.String msg,
          java.lang.Object... parameters)
Log a warning string.

Parameters:
t - the exception to log
msg - the message to log
parameters - the parameters used to format the message

warnp

void warnp(java.lang.Object clazz,
           java.lang.String method,
           java.lang.String msg,
           java.lang.Object... parameters)
Log a warning string.

Parameters:
clazz - the object class
method - the method name
msg - the message to log
parameters - the parameters used to format the message

warnp

void warnp(java.lang.Object clazz,
           java.lang.String method,
           java.lang.Throwable t,
           java.lang.String msg,
           java.lang.Object... parameters)
Log a warning string.

Parameters:
clazz - the object class
method - the method name
t - the exception to log
msg - the message to log
parameters - the parameters used to format the message

error

void error(java.lang.String msg,
           java.lang.Object... parameters)
Log an error string.

Parameters:
msg - the message to log
parameters - the parameters used to format the message

error

void error(java.lang.Throwable t,
           java.lang.String msg,
           java.lang.Object... parameters)
Log an error string.

Parameters:
t - the exception to log
msg - the message to log
parameters - the parameters used to format the message

errorp

void errorp(java.lang.Object clazz,
            java.lang.String method,
            java.lang.String msg,
            java.lang.Object... parameters)
Log an error string.

Parameters:
clazz - the object class
method - the method name
msg - the message to log
parameters - the parameters used to format the message

errorp

void errorp(java.lang.Object clazz,
            java.lang.String method,
            java.lang.Throwable t,
            java.lang.String msg,
            java.lang.Object... parameters)
Log an error string.

Parameters:
clazz - the object class
method - the method name
t - the exception to log
msg - the message to log
parameters - the parameters used to format the message

traceEvent

void traceEvent(java.lang.String msg,
                java.lang.Object... parameters)
Trace an event (Level=FINE).

Parameters:
msg - the message to log
parameters - the parameters used to format the message

traceEvent

void traceEvent(java.lang.Throwable t,
                java.lang.String msg,
                java.lang.Object... parameters)
Trace an event (Level=FINE).

Parameters:
t - the exception to log
msg - the message to log
parameters - the parameters used to format the message

traceEventp

void traceEventp(java.lang.Object clazz,
                 java.lang.String method,
                 java.lang.String msg,
                 java.lang.Object... parameters)
Trace an event (Level=FINE).

Parameters:
clazz - the object class
method - the method name
msg - the message to log
parameters - the parameters used to format the message

traceEventp

void traceEventp(java.lang.Object clazz,
                 java.lang.String method,
                 java.lang.Throwable t,
                 java.lang.String msg,
                 java.lang.Object... parameters)
Trace an event (Level=FINE).

Parameters:
clazz - the object class
method - the method name
t - the exception to log
msg - the message to log
parameters - the parameters used to format the message

traceDebug

void traceDebug(java.lang.String msg,
                java.lang.Object... parameters)
Trace an event for debug (Level=FINEST).

Parameters:
msg - the message to log
parameters - the parameters used to format the message

traceDebug

void traceDebug(java.lang.Throwable t,
                java.lang.String msg,
                java.lang.Object... parameters)
Trace an event for debug (Level=FINEST).

Parameters:
t - the exception to log
msg - the message to log
parameters - the parameters used to format the message

traceDebugp

void traceDebugp(java.lang.Object clazz,
                 java.lang.String methodName,
                 java.lang.String msg,
                 java.lang.Object... parameters)
Trace an event for debug (Level=FINEST).

Parameters:
clazz - the object class
methodName - the method name
msg - the message to log
parameters - the parameters used to format the message

traceDebugp

void traceDebugp(java.lang.Object clazz,
                 java.lang.String methodName,
                 java.lang.Throwable t,
                 java.lang.String msg,
                 java.lang.Object... parameters)
Trace an event for debug (Level=FINEST).

Parameters:
clazz - the object class
methodName - the method name
t - the exception to log
msg - the message to log
parameters - the parameters used to format the message

traceEntry

void traceEntry(java.lang.Object clazz,
                java.lang.String methodName)
Trace when a method is entered.

Parameters:
clazz - the object class
methodName - the method name

traceEntry

void traceEntry(java.lang.Object clazz,
                java.lang.String methodName,
                java.lang.Object... parameters)
Trace when a method is entered.

Parameters:
clazz - the object class
methodName - the method name
parameters - the parameters passed to the method when invoked

traceExit

void traceExit(java.lang.Object clazz,
               java.lang.String methodName)
Trace when a method is exited.

Parameters:
clazz - the object class
methodName - the method name

traceExit

void traceExit(java.lang.Object clazz,
               java.lang.String methodName,
               java.lang.Object ret)
Trace when a method is exited.

Parameters:
clazz - the object class
methodName - the method name
Object - the value being returned by the method