org.jmonit.log
Class ConsoleLogger

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

public class ConsoleLogger
extends Log

Logger implementation that write long to console (System.out).

Author:
Nicolas De Loof

Field Summary
static java.lang.String LEVEL
          System property for setting logging level
 
Constructor Summary
ConsoleLogger(java.lang.Class caller)
          Constructeur
 
Method Summary
 void debug(java.lang.String message)
          
 void error(java.lang.String message)
          
 void error(java.lang.String message, java.lang.Throwable t)
          
static int getLevel()
           
 void info(java.lang.String message)
          
 void info(java.lang.String message, java.lang.Throwable t)
          
 boolean isDebugEnabled()
          
static void setLevel(int level)
           
 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
 

Field Detail

LEVEL

public static final java.lang.String LEVEL
System property for setting logging level

See Also:
Constant Field Values
Constructor Detail

ConsoleLogger

public ConsoleLogger(java.lang.Class caller)
Constructeur

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)

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)

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)

getLevel

public static int getLevel()
Returns:
the level

setLevel

public static void setLevel(int level)
Parameters:
level - the level to set


Copyright © 2007 Nicolas De Loof. All Rights Reserved.