rabbit.util
Class SimpleLogger

java.lang.Object
  extended by rabbit.util.SimpleLogger
All Implemented Interfaces:
Logger

public class SimpleLogger
extends Object
implements Logger

A logger that logs to stdout/stderr.

Author:
Robert Olofsson

Constructor Summary
SimpleLogger()
           
 
Method Summary
 void logAll(String error)
          Log some information Same as logError (ALL, error);
 void logDebug(String error)
          Log a debug message.
 void logError(Level level, String error)
          Log an error of given type and with given message.
 void logError(String error)
          Log an error.
 void logFatal(String error)
          Log an fatal error.
 void logInfo(String error)
          Log some information.
 void logMsg(String error)
          Log a message.
 void logWarn(String error)
          Log a warning.
 void rotateLogs()
          Rotate the current logs.
 void setLogLevel(Level level)
           
 boolean showsLevel(Level level)
          Check if the logger currently handles logging on the given level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleLogger

public SimpleLogger()
Method Detail

showsLevel

public boolean showsLevel(Level level)
Description copied from interface: Logger
Check if the logger currently handles logging on the given level.

Specified by:
showsLevel in interface Logger

setLogLevel

public void setLogLevel(Level level)

logDebug

public void logDebug(String error)
Description copied from interface: Logger
Log a debug message. Same as logError (DEBUG, error);

Specified by:
logDebug in interface Logger

logAll

public void logAll(String error)
Description copied from interface: Logger
Log some information Same as logError (ALL, error);

Specified by:
logAll in interface Logger

logInfo

public void logInfo(String error)
Description copied from interface: Logger
Log some information. Same as logError (Info, error);

Specified by:
logInfo in interface Logger

logWarn

public void logWarn(String error)
Description copied from interface: Logger
Log a warning. Same as logError (WARN, error);

Specified by:
logWarn in interface Logger

logMsg

public void logMsg(String error)
Description copied from interface: Logger
Log a message. Same as logError (MSG, error);

Specified by:
logMsg in interface Logger

logError

public void logError(String error)
Description copied from interface: Logger
Log an error. Same as logError (ERROR, error);

Specified by:
logError in interface Logger

logFatal

public void logFatal(String error)
Description copied from interface: Logger
Log an fatal error. Same as logError (FATAL, error);

Specified by:
logFatal in interface Logger

logError

public void logError(Level level,
                     String error)
Description copied from interface: Logger
Log an error of given type and with given message.

Specified by:
logError in interface Logger
Parameters:
level - the error level.
error - the error message.

rotateLogs

public void rotateLogs()
Description copied from interface: Logger
Rotate the current logs. That is close the current log files and move them away, then reopen the log files again.

Specified by:
rotateLogs in interface Logger