org.jmonit.log
Class Log4jLogger

java.lang.Object
  extended by org.jmonit.log.Log
      extended by org.jmonit.log.Log4jLogger

public class Log4jLogger
extends Log

Logger implementation that delegates to log4j loggers.

Use the deprecate Priority constants for compatibility with earlyer versions of log4j.

Author:
Nicolas De Loof

Constructor Summary
Log4jLogger(java.lang.Class caller)
          Constructor
 
Method Summary
 void debug(java.lang.String message)
          
 void error(java.lang.String message)
          
 void error(java.lang.String message, java.lang.Throwable t)
          
 void info(java.lang.String message)
          
 void info(java.lang.String message, java.lang.Throwable t)
          
 boolean isDebugEnabled()
          
 void warn(java.lang.String message)
          
 void warn(java.lang.String message, java.lang.Throwable t)
          
 
Methods inherited from class org.jmonit.log.Log
getLog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Log4jLogger

public Log4jLogger(java.lang.Class caller)
Constructor

Parameters:
caller - target logging class
Method Detail

isDebugEnabled

public boolean isDebugEnabled()

Specified by:
isDebugEnabled in class Log
Returns:
true if debug logs are enabled
See Also:
info.jmonit.logger.Log#isDebugEnabled()

debug

public void debug(java.lang.String message)

Specified by:
debug in class Log
Parameters:
message - message to be logged
See Also:
info.jmonit.logger.Log#debug(java.lang.String)

info

public void info(java.lang.String message)

Specified by:
info in class Log
Parameters:
message - message to be logged
See Also:
info.jmonit.logger.Log#info(java.lang.String)

info

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

Specified by:
info in class Log
Parameters:
message - message to be logged
t - Exception to be logged
See Also:
info.jmonit.logger.Log#info(java.lang.String, Throwable)

error

public void error(java.lang.String message)

Specified by:
error in class Log
Parameters:
message - message to be logged
See Also:
info.jmonit.logger.Log#error(java.lang.String)

error

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

Specified by:
error in class Log
Parameters:
message - message to be logged
t - Exception to be logged
See Also:
info.jmonit.logger.Log#error(java.lang.String, Throwable)

warn

public void warn(java.lang.String message)

Specified by:
warn in class Log
Parameters:
message - message to be logged
See Also:
info.jmonit.logger.Log#warn(java.lang.String)

warn

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

Specified by:
warn in class Log
Parameters:
message - message to be logged
t - Exception to be logged
See Also:
info.jmonit.logger.Log#warn(java.lang.String, Throwable)


Copyright © 2007 Nicolas De Loof. All Rights Reserved.