raccoon.core.log
Class Jdk14Proxy

java.lang.Object
  extended by raccoon.core.types.AbsComponent
      extended by raccoon.core.types.AbsLoadable
          extended by raccoon.core.types.AbsConfigurableLoadable
              extended by raccoon.core.log.AbsLogComponent
                  extended by raccoon.core.log.Jdk14Proxy
All Implemented Interfaces:
ILogger, IBaseComponent, IConfigurable, ILoadable, ILogable

public final class Jdk14Proxy
extends AbsLogComponent

The wrapper around the JDK 1.4 Logging mechanism.

Since:
Raccoon v0.5
Version:
$Id: Jdk14Proxy.java,v 1.2 2003/07/01 19:19:32 crouvrais Exp $
Author:
Cedric ROUVRAIS

Field Summary
 
Fields inherited from class raccoon.core.log.AbsLogComponent
LOGGER_NAME, mLoggerName, mPropertyFileName, PROPERTY_FILE_NAME
 
Fields inherited from class raccoon.core.types.AbsConfigurableLoadable
mConfigurableManager
 
Fields inherited from class raccoon.core.types.AbsLoadable
mIsLoaded
 
Fields inherited from class raccoon.core.types.AbsComponent
mIsInError
 
Fields inherited from interface raccoon.api.log.ILogger
LEVEL_DEBUG, LEVEL_ERROR, LEVEL_INFO, LEVEL_WARN, PTY_LOGGER
 
Constructor Summary
Jdk14Proxy()
          Required constructor for dynamic instanciation.
 
Method Summary
 void configureParameters()
          Configures the various parameters for this component.
 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
 java.lang.String debugLevelToString()
          The debug level as a string
 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 errorLevelToString()
          The error level as a string
protected  void getLogInstance()
          Instanciates the logging element.
 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
 java.lang.String infoLevelToString()
          The info level as a string
 boolean isDebugEnabled()
          Returns true if debug mode is enabled.
 boolean isErrorEnabled()
          Returns true if error mode is enabled.
 boolean isInfoEnabled()
          Returns true if info mode is enabled.
 boolean isWarnEnabled()
          Returns true if warn mode is enabled.
protected  void loadLoggers()
          Loads the various loggers required to function.
 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
 java.lang.String warnLevelToString()
          The warn level as a string
 
Methods inherited from class raccoon.core.log.AbsLogComponent
getCallingClassLevel, getCategoryName, getLoggerName, getPropertyFileName, load, setCallingClassLevel, setCategoryName, setLoggerName, setPropertyFileName
 
Methods inherited from class raccoon.core.types.AbsConfigurableLoadable
isStable, setConfigurableManager, setLogger
 
Methods inherited from class raccoon.core.types.AbsLoadable
getLog, isInError, isInitialised, isRunning, unload
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Jdk14Proxy

public Jdk14Proxy()
Required constructor for dynamic instanciation.

Method Detail

configureParameters

public void configureParameters()
Configures the various parameters for this component. This method should configure the instance of IConfigurableManager provided during the invocation of AbsConfigurableLoadable.setConfigurableManager(IConfigurableManager).

Specified by:
configureParameters in interface IConfigurable
Overrides:
configureParameters in class AbsConfigurableLoadable

loadLoggers

protected void loadLoggers()
                    throws LoadableException
Loads the various loggers required to function.

Specified by:
loadLoggers in class AbsLogComponent
Throws:
LoadableException - if the loggers couldn't be correctly loaded.

getLogInstance

protected void getLogInstance()
Instanciates the logging element.

Specified by:
getLogInstance in class AbsLogComponent

isDebugEnabled

public boolean isDebugEnabled()
Returns true 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

public boolean isInfoEnabled()
Returns true 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

public boolean isWarnEnabled()
Returns true 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

public boolean isErrorEnabled()
Returns true 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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)

debugLevelToString

public java.lang.String debugLevelToString()
The debug level as a string

Specified by:
debugLevelToString in class AbsLogComponent
Returns:
debug string representation

infoLevelToString

public java.lang.String infoLevelToString()
The info level as a string

Specified by:
infoLevelToString in class AbsLogComponent
Returns:
info string representation

warnLevelToString

public java.lang.String warnLevelToString()
The warn level as a string

Specified by:
warnLevelToString in class AbsLogComponent
Returns:
warn string representation

errorLevelToString

public java.lang.String errorLevelToString()
The error level as a string

Specified by:
errorLevelToString in class AbsLogComponent
Returns:
error string representation


Copyright null null. All Rights Reserved.