net.sf.mmapps.commons.logging.impl
Class MMBase17Logger

java.lang.Object
  extended bynet.sf.mmapps.commons.logging.impl.MMBase17Logger
All Implemented Interfaces:
org.apache.commons.logging.Log
Direct Known Subclasses:
MMBase18Logger

public class MMBase17Logger
extends java.lang.Object
implements org.apache.commons.logging.Log

Adaptor class to convert jakarta-commons Log calls to MMBase 1.7 Logger calls.

There are some differences between commons-logging and MMBase 1.7 logging. First of all MMBase 1.7 does not support creating log message that have a Throwable as second argument, therefore the methods that use the Throwable argument are rerouted to the methods without the argument. The second difference is that MMBase uses some different Logging levels. documentation about what is actualy called is documented in the method documentation.

Author:
Kees Jongenburger

Field Summary
protected  org.mmbase.util.logging.Logger logger
           
 
Constructor Summary
MMBase17Logger(org.mmbase.util.logging.Logger logger)
          creates a new adaptor
 
Method Summary
 void debug(java.lang.Object object)
          calls Logger.debug(java.lang.Object)
 void debug(java.lang.Object object, java.lang.Throwable throwable)
          calls Logger.debug(java.lang.Object), discards the throwable argument
 void error(java.lang.Object object)
          calls Logger.error(java.lang.Object)
 void error(java.lang.Object object, java.lang.Throwable throwable)
          calls Logger.error(java.lang.Object), discards the throwable argument
 void fatal(java.lang.Object object)
          calls Logger.fatal(java.lang.Object)
 void fatal(java.lang.Object object, java.lang.Throwable throwable)
          calls Logger.fatal(java.lang.Object), discards the throwable argument
 void info(java.lang.Object object)
          calls Logger.info(java.lang.Object)
 void info(java.lang.Object object, java.lang.Throwable throwable)
          calls Logger.info(java.lang.Object) , discards the throwable argument
 boolean isDebugEnabled()
           
 boolean isErrorEnabled()
           
 boolean isFatalEnabled()
           
 boolean isInfoEnabled()
           
 boolean isTraceEnabled()
           
 boolean isWarnEnabled()
           
 void trace(java.lang.Object object)
          calls Logger.trace(java.lang.Object)
 void trace(java.lang.Object object, java.lang.Throwable throwable)
          calls Logger.trace(java.lang.Object) , discard the throwable argument
 void warn(java.lang.Object object)
          calls Logger.warn(java.lang.Object)
 void warn(java.lang.Object object, java.lang.Throwable throwable)
          calls Logger.warn(java.lang.Object) , discards the throwable argument
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected org.mmbase.util.logging.Logger logger
Constructor Detail

MMBase17Logger

public MMBase17Logger(org.mmbase.util.logging.Logger logger)
creates a new adaptor

Parameters:
logger - the logger to use
Method Detail

isDebugEnabled

public boolean isDebugEnabled()
Specified by:
isDebugEnabled in interface org.apache.commons.logging.Log
Returns:
if debug is enabled in the MMBaseLogger

isErrorEnabled

public boolean isErrorEnabled()
Specified by:
isErrorEnabled in interface org.apache.commons.logging.Log
Returns:
if service is enabled in the MMBaseLogger

isFatalEnabled

public boolean isFatalEnabled()
Specified by:
isFatalEnabled in interface org.apache.commons.logging.Log
Returns:
is service is enabled in the MMBase logger

isInfoEnabled

public boolean isInfoEnabled()
Specified by:
isInfoEnabled in interface org.apache.commons.logging.Log
Returns:
is service is enabled in the MMBase logger

isTraceEnabled

public boolean isTraceEnabled()
Specified by:
isTraceEnabled in interface org.apache.commons.logging.Log
Returns:
if debug is enabled in the MMBaseLogger

isWarnEnabled

public boolean isWarnEnabled()
Specified by:
isWarnEnabled in interface org.apache.commons.logging.Log
Returns:
is service is enabled in the MMBaseLogger

trace

public void trace(java.lang.Object object)
calls Logger.trace(java.lang.Object)

Specified by:
trace in interface org.apache.commons.logging.Log

trace

public void trace(java.lang.Object object,
                  java.lang.Throwable throwable)
calls Logger.trace(java.lang.Object) , discard the throwable argument

Specified by:
trace in interface org.apache.commons.logging.Log

debug

public void debug(java.lang.Object object)
calls Logger.debug(java.lang.Object)

Specified by:
debug in interface org.apache.commons.logging.Log

debug

public void debug(java.lang.Object object,
                  java.lang.Throwable throwable)
calls Logger.debug(java.lang.Object), discards the throwable argument

Specified by:
debug in interface org.apache.commons.logging.Log

info

public void info(java.lang.Object object)
calls Logger.info(java.lang.Object)

Specified by:
info in interface org.apache.commons.logging.Log

info

public void info(java.lang.Object object,
                 java.lang.Throwable throwable)
calls Logger.info(java.lang.Object) , discards the throwable argument

Specified by:
info in interface org.apache.commons.logging.Log

warn

public void warn(java.lang.Object object)
calls Logger.warn(java.lang.Object)

Specified by:
warn in interface org.apache.commons.logging.Log

warn

public void warn(java.lang.Object object,
                 java.lang.Throwable throwable)
calls Logger.warn(java.lang.Object) , discards the throwable argument

Specified by:
warn in interface org.apache.commons.logging.Log

error

public void error(java.lang.Object object)
calls Logger.error(java.lang.Object)

Specified by:
error in interface org.apache.commons.logging.Log

error

public void error(java.lang.Object object,
                  java.lang.Throwable throwable)
calls Logger.error(java.lang.Object), discards the throwable argument

Specified by:
error in interface org.apache.commons.logging.Log

fatal

public void fatal(java.lang.Object object)
calls Logger.fatal(java.lang.Object)

Specified by:
fatal in interface org.apache.commons.logging.Log

fatal

public void fatal(java.lang.Object object,
                  java.lang.Throwable throwable)
calls Logger.fatal(java.lang.Object), discards the throwable argument

Specified by:
fatal in interface org.apache.commons.logging.Log


Copyright © 2003-2004 mmapps. All Rights Reserved.