raccoon.api.log
Interface ILogger

All Known Implementing Classes:
AbsLogComponent, Jdk14Proxy, Log4jProxy, LogConsole

public interface ILogger

The interface for all log type services.

The order of priority is as follows : ERROR > WARNING > DEBUG > INFO
That means that if the WARNING level is enabled only ERROR and WARNING messages will be logged the other levels will be ignored.

Since:
Raccoon v0.1, refactored in Raccoon v0.6 & v0.8
Version:
$Id: ILogger.java,v 1.1 2004/08/08 20:25:57 crouvrais Exp $
Author:
Cedric ROUVRAIS

Field Summary
static int LEVEL_DEBUG
          The DEBUG level.
static int LEVEL_ERROR
          The ERROR level.
static int LEVEL_INFO
          The INFO level.
static int LEVEL_WARN
          The WARN level.
static java.lang.String PTY_LOGGER
          The name of the property for components using implementations of this interface.
 
Method Summary
 void debug(java.lang.String pMessage)
          Inserts a String into the log only if the DEBUG level is enabled.
 void debug(java.lang.String pMessage, java.lang.Object[] pParams)
          Inserts a String into the log only if the DEBUG level is enabled.
 void debug(java.lang.String pMessage, java.lang.Object[] pParams, java.lang.Throwable pThrowable)
          Inserts a String and an Exception into the log only if the DEBUG level is enabled.
 void debug(java.lang.String pMessage, java.lang.Throwable pThrowable)
          Inserts a String and an Exception into the log only if the DEBUG level is enabled.
 void error(java.lang.String pMessage)
          Inserts a String into the log only if the ERROR level is enabled.
 void error(java.lang.String pMessage, java.lang.Object[] pParams)
          Inserts a String into the log only if the ERROR level is enabled.
 void error(java.lang.String pMessage, java.lang.Object[] pParams, java.lang.Throwable pThrowable)
          Inserts a String and an Exception into the log only if the ERROR level is enabled.
 void error(java.lang.String pMessage, java.lang.Throwable pThrowable)
          Inserts a String and an Exception into the log only if the ERROR level is enabled.
 java.lang.String getCategoryName()
          Deprecated. As of Raccoon v0.8
 java.lang.String getLoggerName()
          The logger under which this component is logging the information.
 void info(java.lang.String pMessage)
          Inserts a String into the log only if the INFO level is enabled.
 void info(java.lang.String pMessage, java.lang.Object[] pParams)
          Inserts a String into the log only if the INFO level is enabled.
 void info(java.lang.String pMessage, java.lang.Object[] pParams, java.lang.Throwable pThrowable)
          Insert a String and an exception into the log only if the INFO level is enabled.
 void info(java.lang.String pMessage, java.lang.Throwable pThrowable)
          Inserts a String and an Exception into the log only if the INFO level is enabled.
 boolean isDebugEnabled()
          Checks if debug mode is enabled.
 boolean isErrorEnabled()
          Checks if error mode is enabled.
 boolean isInfoEnabled()
          Checks if info mode is enabled.
 boolean isWarnEnabled()
          Checks if warn mode is enabled.
 void setCategoryName(java.lang.String pCategoryName)
          Deprecated. As of Raccoon v0.8
 void setLoggerName(java.lang.String pLoggerName)
          Defines the logger under which this component should log the information.
 void warn(java.lang.String pMessage)
          Inserts a String into the log only if the WARN level is enabled.
 void warn(java.lang.String pMessage, java.lang.Object[] pParams)
          Inserts a String into the log only if the WARN level is enabled.
 void warn(java.lang.String pMessage, java.lang.Object[] pParams, java.lang.Throwable pThrowable)
          Inserts a String and an Exception into the log only if the WARN level is enabled.
 void warn(java.lang.String pMessage, java.lang.Throwable pThrowable)
          Inserts a String and an Exception into the log only if the WARN level is enabled.
 

Field Detail

PTY_LOGGER

static final java.lang.String PTY_LOGGER
The name of the property for components using implementations of this interface.

See Also:
Constant Field Values

LEVEL_ERROR

static final int LEVEL_ERROR
The ERROR level.

See Also:
Constant Field Values

LEVEL_WARN

static final int LEVEL_WARN
The WARN level.

See Also:
Constant Field Values

LEVEL_INFO

static final int LEVEL_INFO
The INFO level.

See Also:
Constant Field Values

LEVEL_DEBUG

static final int LEVEL_DEBUG
The DEBUG level.

See Also:
Constant Field Values
Method Detail

isDebugEnabled

boolean isDebugEnabled()
Checks if debug mode is enabled. Use this method to avoid unnecessary String construction when calling the debug method.

Returns:
will use of debug produce some logs?

isInfoEnabled

boolean isInfoEnabled()
Checks if info mode is enabled. Use this method to avoid unnecessary String construction when calling the info method.

Returns:
true if info mode is enabled

isWarnEnabled

boolean isWarnEnabled()
Checks if warn mode is enabled. Use this method to avoid unnecessary String construction when calling the warn method.

Returns:
true if warn mode is enabled

isErrorEnabled

boolean isErrorEnabled()
Checks if error mode is enabled. Use this method to avoid unnecessary String construction when calling the error method.

Returns:
true if error mode is enabled

info

void info(java.lang.String pMessage)
Inserts a String into the log only if the INFO level is enabled.

Parameters:
pMessage - the message to log.

info

void info(java.lang.String pMessage,
          java.lang.Throwable pThrowable)
Inserts a String and an Exception into the log only if the INFO level is enabled.

Parameters:
pMessage - the message to log.
pThrowable - the throwable to log.

info

void info(java.lang.String pMessage,
          java.lang.Object[] pParams)
Inserts a String into the log only if the INFO level is enabled. The String is of course a specific String, because each occurrence of {i} in that String will be replaced by Object[i].toString()
For example:
info("Hello {0}, you have {1}, new Object[] {"Kathleen", "mail"});
Should result be equivalent to the following call:
info("Hello Kathleen, you have mail");
No matter what the implementation behind the scenes.

Parameters:
pMessage - the message to log.
pParams - a list of objects that implement the toString() method.

info

void info(java.lang.String pMessage,
          java.lang.Object[] pParams,
          java.lang.Throwable pThrowable)
Insert a String and an exception into the log only if the INFO level is enabled.

Parameters:
pMessage - the message to log.
pParams - a list of objects that implement the toString() method.
pThrowable - the throwable to log.
See Also:
info(String, Object[])

debug

void debug(java.lang.String pMessage)
Inserts a String into the log only if the DEBUG level is enabled.

Parameters:
pMessage - the message to log.

debug

void debug(java.lang.String pMessage,
           java.lang.Throwable pThrowable)
Inserts a String and an Exception into the log only if the DEBUG level is enabled.

Parameters:
pMessage - the message to log.
pThrowable - the throwable to log.

debug

void debug(java.lang.String pMessage,
           java.lang.Object[] pParams)
Inserts a String into the log only if the DEBUG level is enabled.

Parameters:
pMessage - the message to log.
pParams - a list of objects that implement the toString() method.
See Also:
info(String, Object[])

debug

void debug(java.lang.String pMessage,
           java.lang.Object[] pParams,
           java.lang.Throwable pThrowable)
Inserts a String and an Exception into the log only if the DEBUG level is enabled.

Parameters:
pMessage - the message to log.
pParams - a list of objects that implement the toString() method.
pThrowable - the throwable to log.
See Also:
info(String, Object[], Throwable)

warn

void warn(java.lang.String pMessage)
Inserts a String into the log only if the WARN level is enabled.

Parameters:
pMessage - the message to log.

warn

void warn(java.lang.String pMessage,
          java.lang.Throwable pThrowable)
Inserts a String and an Exception into the log only if the WARN level is enabled.

Parameters:
pThrowable - the throwable to log.
pMessage - the message to log.

warn

void warn(java.lang.String pMessage,
          java.lang.Object[] pParams)
Inserts a String into the log only if the WARN level is enabled.

Parameters:
pMessage - the message to log.
pParams - a list of objects that implement the toString() method.
See Also:
info(String, Object[])

warn

void warn(java.lang.String pMessage,
          java.lang.Object[] pParams,
          java.lang.Throwable pThrowable)
Inserts a String and an Exception into the log only if the WARN level is enabled.

Parameters:
pMessage - the message to log.
pParams - a list of objects that implement the toString() method.
pThrowable - the throwable to log.
See Also:
info(String, Object[], Throwable)

error

void error(java.lang.String pMessage)
Inserts a String into the log only if the ERROR level is enabled.

Parameters:
pMessage - the message to log.

error

void error(java.lang.String pMessage,
           java.lang.Throwable pThrowable)
Inserts a String and an Exception into the log only if the ERROR level is enabled.

Parameters:
pThrowable - the throwable to log.
pMessage - the message to log.

error

void error(java.lang.String pMessage,
           java.lang.Object[] pParams)
Inserts a String into the log only if the ERROR level is enabled.

Parameters:
pMessage - the message to log.
pParams - a list of objects that implement the toString() method.
See Also:
info(String, Object[])

error

void error(java.lang.String pMessage,
           java.lang.Object[] pParams,
           java.lang.Throwable pThrowable)
Inserts a String and an Exception into the log only if the ERROR level is enabled.

Parameters:
pMessage - the message to log.
pParams - a list of objects that implement the toString() method.
pThrowable - the throwable to log.
See Also:
info(String, Object[], Throwable)

getCategoryName

java.lang.String getCategoryName()
Deprecated. As of Raccoon v0.8

The category under which this component is logging the information.

Returns:
the category name of the current instance.

setCategoryName

void setCategoryName(java.lang.String pCategoryName)
                     throws java.lang.IllegalStateException
Deprecated. As of Raccoon v0.8

Defines the category under which this component should log the information.

Parameters:
pCategoryName - the category to use for this session.
Throws:
java.lang.IllegalStateException - if the component is already running

getLoggerName

java.lang.String getLoggerName()
The logger under which this component is logging the information.

Returns:
the logger name of the current instance.

setLoggerName

void setLoggerName(java.lang.String pLoggerName)
                   throws java.lang.IllegalStateException
Defines the logger under which this component should log the information.

Parameters:
pLoggerName - the logger to use for this session.
Throws:
java.lang.IllegalStateException - if the component is already running


Copyright null null. All Rights Reserved.