JavaGantt 2011.1 API

eu.beesoft.gaia.log.apache
Class ApacheLog

java.lang.Object
  extended by eu.beesoft.gaia.log.AbstractLog
      extended by eu.beesoft.gaia.log.apache.ApacheLog
All Implemented Interfaces:
Log

public class ApacheLog
extends AbstractLog

Instances of this class are the bridge between Log implementation and org.apache.commons.logging.Log instances. They are created by ApacheLogFactory when new log is requested.


Constructor Summary
ApacheLog(java.lang.String name, org.apache.commons.logging.Log log)
          Creates a new instance of ApacheLog.
 
Method Summary
 void debug(java.lang.String message, java.lang.Throwable exception)
          Logs a DEBUG message, if this level is enabled.
 void error(java.lang.String message, java.lang.Throwable exception)
          Logs an ERROR message, if this level is enabled.
 org.apache.commons.logging.Log getLog()
          Returns an instance of org.apache.commons.logging.Log of this log.
 java.lang.String getName()
          Returns a name of this log.
 void info(java.lang.String message, java.lang.Throwable exception)
          Logs an INFO message, if this level is enabled.
 boolean isDebugEnabled()
          Returns true if logging on level DEBUG is enabled.
 boolean isInfoEnabled()
          Returns true if logging on level INFO is enabled.
 boolean isWarnEnabled()
          Returns true if logging on level WARNING is enabled.
 void warn(java.lang.String message, java.lang.Throwable exception)
          Logs a WARNING message, if this level is enabled.
 
Methods inherited from class eu.beesoft.gaia.log.AbstractLog
debug, debug, entering, entering, error, error, exiting, exiting, info, info, mergeMessageWithParameters, toString, warn, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApacheLog

public ApacheLog(java.lang.String name,
                 org.apache.commons.logging.Log log)
Creates a new instance of ApacheLog.

Parameters:
name - - name (class name) of the log
log - - Apache commons log instance used to logging
Method Detail

getName

public java.lang.String getName()
Returns a name of this log.

Returns:
name of log

getLog

public org.apache.commons.logging.Log getLog()
Returns an instance of org.apache.commons.logging.Log of this log.

Returns:
implemented system log

isDebugEnabled

public boolean isDebugEnabled()
Description copied from interface: Log
Returns true if logging on level DEBUG is enabled.

Specified by:
isDebugEnabled in interface Log
Specified by:
isDebugEnabled in class AbstractLog
Returns:
true if DEBUG is enabled

debug

public void debug(java.lang.String message,
                  java.lang.Throwable exception)
Description copied from interface: Log
Logs a DEBUG message, if this level is enabled.

Specified by:
debug in interface Log
Specified by:
debug in class AbstractLog
Parameters:
message - - message to log
exception - - exception to log

isInfoEnabled

public boolean isInfoEnabled()
Description copied from interface: Log
Returns true if logging on level INFO is enabled.

Specified by:
isInfoEnabled in interface Log
Specified by:
isInfoEnabled in class AbstractLog
Returns:
true if INFO is enabled

info

public void info(java.lang.String message,
                 java.lang.Throwable exception)
Description copied from interface: Log
Logs an INFO message, if this level is enabled.

Specified by:
info in interface Log
Specified by:
info in class AbstractLog
Parameters:
message - - message to log
exception - - exception to log

isWarnEnabled

public boolean isWarnEnabled()
Description copied from interface: Log
Returns true if logging on level WARNING is enabled.

Specified by:
isWarnEnabled in interface Log
Specified by:
isWarnEnabled in class AbstractLog
Returns:
true if WARNING is enabled

warn

public void warn(java.lang.String message,
                 java.lang.Throwable exception)
Description copied from interface: Log
Logs a WARNING message, if this level is enabled.

Specified by:
warn in interface Log
Specified by:
warn in class AbstractLog
Parameters:
message - - message to log
exception - - exception to log

error

public void error(java.lang.String message,
                  java.lang.Throwable exception)
Description copied from interface: Log
Logs an ERROR message, if this level is enabled.

Specified by:
error in interface Log
Specified by:
error in class AbstractLog
Parameters:
message - - message to log
exception - - exception to log

JavaGantt 2011.1 API