de.bea.domingo.monitor
Class Log4jMonitor

java.lang.Object
  extended by de.bea.domingo.monitor.Log4jMonitor
All Implemented Interfaces:
DNotesMonitor

public final class Log4jMonitor
extends java.lang.Object
implements DNotesMonitor

Adapter from Apache Log4j to the domingo monitor interface.

Use an instance of this class as argument to DNotesFactory.getInstance(DNotesMonitor theMonitor).

If Log4j should be used for logging, the log4j.jar file must be available in the classpath. Log4h can be downloaded at .

Since:
domingo 1.1

Field Summary
 
Fields inherited from interface de.bea.domingo.DNotesMonitor
DEBUG, DEFAULT_LEVEL, ERROR, FATAL, INFO, NONE, WARN
 
Constructor Summary
Log4jMonitor()
          Constructor.
Log4jMonitor(org.apache.log4j.Logger log)
          Constructor.
 
Method Summary
 void debug(java.lang.String message)
          debug output.
 void debug(java.lang.String message, java.lang.Throwable throwable)
          debug output.
 void error(java.lang.String message)
          error output.
 void error(java.lang.String message, java.lang.Throwable throwable)
          error output.
 void fatalError(java.lang.String message)
          fatal error output.
 void fatalError(java.lang.String message, java.lang.Throwable throwable)
          fatal error output.
 org.apache.log4j.Logger getLogger()
          Returns the current Log4j log.
 void info(java.lang.String message)
          info output.
 void info(java.lang.String message, java.lang.Throwable throwable)
          info output.
 boolean isDebugEnabled()
          Checks if debug output is enabled or not.
 boolean isErrorEnabled()
          Checks if error output is enabled or not.
 boolean isFatalErrorEnabled()
          Checks if fatal error output is enabled or not.
 boolean isInfoEnabled()
          Checks if info output is enabled or not.
 boolean isWarnEnabled()
          Checks if warn output is enabled or not.
 void setLogger(org.apache.log4j.Logger log)
          Sets a new Log4j log.
 void warn(java.lang.String message)
          warn output.
 void warn(java.lang.String message, java.lang.Throwable throwable)
          warn output.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Log4jMonitor

public Log4jMonitor()
Constructor.

Creates a monitor with a default Logj log.


Log4jMonitor

public Log4jMonitor(org.apache.log4j.Logger log)
Constructor.

Parameters:
log - a Log4j log instance
Method Detail

getLogger

public org.apache.log4j.Logger getLogger()
Returns the current Log4j log.

Returns:
current Log4j log

setLogger

public void setLogger(org.apache.log4j.Logger log)
Sets a new Log4j log.

Parameters:
log - the new Log4j log

debug

public void debug(java.lang.String message,
                  java.lang.Throwable throwable)
debug output.

Specified by:
debug in interface DNotesMonitor
Parameters:
message - the message
throwable - the throwable
See Also:
DNotesMonitor.debug(java.lang.String, java.lang.Throwable)

debug

public void debug(java.lang.String message)
debug output.

Specified by:
debug in interface DNotesMonitor
Parameters:
message - the message
See Also:
DNotesMonitor.debug(java.lang.String)

info

public void info(java.lang.String message,
                 java.lang.Throwable throwable)
info output.

Specified by:
info in interface DNotesMonitor
Parameters:
message - the message
throwable - the throwable
See Also:
DNotesMonitor.info(java.lang.String, java.lang.Throwable)

info

public void info(java.lang.String message)
info output.

Specified by:
info in interface DNotesMonitor
Parameters:
message - the message
See Also:
DNotesMonitor.info(java.lang.String)

warn

public void warn(java.lang.String message,
                 java.lang.Throwable throwable)
warn output.

Specified by:
warn in interface DNotesMonitor
Parameters:
message - the message
throwable - the throwable
See Also:
DNotesMonitor.warn(java.lang.String, java.lang.Throwable)

warn

public void warn(java.lang.String message)
warn output.

Specified by:
warn in interface DNotesMonitor
Parameters:
message - the message
See Also:
DNotesMonitor.warn(java.lang.String)

error

public void error(java.lang.String message,
                  java.lang.Throwable throwable)
error output.

Specified by:
error in interface DNotesMonitor
Parameters:
message - the message
throwable - the throwable
See Also:
DNotesMonitor.error(java.lang.String, java.lang.Throwable)

error

public void error(java.lang.String message)
error output.

Specified by:
error in interface DNotesMonitor
Parameters:
message - the message
See Also:
DNotesMonitor.error(java.lang.String)

fatalError

public void fatalError(java.lang.String message,
                       java.lang.Throwable throwable)
fatal error output.

Specified by:
fatalError in interface DNotesMonitor
Parameters:
message - the message
throwable - the throwable
See Also:
DNotesMonitor.fatalError(java.lang.String, java.lang.Throwable)

fatalError

public void fatalError(java.lang.String message)
fatal error output.

Specified by:
fatalError in interface DNotesMonitor
Parameters:
message - the message
See Also:
DNotesMonitor.fatalError(java.lang.String)

isDebugEnabled

public boolean isDebugEnabled()
Checks if debug output is enabled or not.

Specified by:
isDebugEnabled in interface DNotesMonitor
Returns:
trueif enabled, else false
See Also:
DNotesMonitor.isDebugEnabled()

isInfoEnabled

public boolean isInfoEnabled()
Checks if info output is enabled or not.

Specified by:
isInfoEnabled in interface DNotesMonitor
Returns:
trueif enabled, else false
See Also:
DNotesMonitor.isInfoEnabled()

isWarnEnabled

public boolean isWarnEnabled()
Checks if warn output is enabled or not.

Specified by:
isWarnEnabled in interface DNotesMonitor
Returns:
trueif enabled, else false
See Also:
DNotesMonitor.isWarnEnabled()

isErrorEnabled

public boolean isErrorEnabled()
Checks if error output is enabled or not.

Specified by:
isErrorEnabled in interface DNotesMonitor
Returns:
trueif enabled, else false
See Also:
DNotesMonitor.isErrorEnabled()

isFatalErrorEnabled

public boolean isFatalErrorEnabled()
Checks if fatal error output is enabled or not.

Specified by:
isFatalErrorEnabled in interface DNotesMonitor
Returns:
trueif enabled, else false
See Also:
DNotesMonitor.isFatalErrorEnabled()


Domingo Java-API