com.evelopers.unimod.log
Interface Logger

All Known Implementing Classes:
Logger.Console, Logger.Empty

public interface Logger

Interface for loggin system. All components should take this interface on create and use it for logging. Actual implementations may use Log4J or another underlying log system.


Nested Class Summary
static class Logger.Console
          Console logger implementation
static class Logger.Empty
          Empty logger implementation.
 
Field Summary
static Logger CONSOLE
          Simple console logger.
static Logger EMPTY
          Empty logger.
 
Method Summary
 void debug(java.lang.Object message)
          Logs debug message
 void error(java.lang.Object message)
          Logs error message
 void fatal(java.lang.Object message)
          Logs fatal message
 Logger getLogger(java.lang.Class clazz)
          Returns another logger for given class.
 Logger getLogger(java.lang.String name)
          Returns another logger for given name.
 void info(java.lang.Object message)
          Logs info message
 void warn(java.lang.Object message)
          Logs warning message
 

Field Detail

EMPTY

public static final Logger EMPTY
Empty logger. Simply scrip all log messages.


CONSOLE

public static final Logger CONSOLE
Simple console logger. Use System.out and System.err for logging.

Method Detail

getLogger

public Logger getLogger(java.lang.String name)
Returns another logger for given name.

Parameters:
name - new logger name
Returns:
newly created logger

getLogger

public Logger getLogger(java.lang.Class clazz)
Returns another logger for given class.

Parameters:
clazz - class to return logger for
Returns:
newly created logger

info

public void info(java.lang.Object message)
Logs info message

Parameters:
message - message to log

warn

public void warn(java.lang.Object message)
Logs warning message

Parameters:
message - message to log

debug

public void debug(java.lang.Object message)
Logs debug message

Parameters:
message - message to log

error

public void error(java.lang.Object message)
Logs error message

Parameters:
message - message to log

fatal

public void fatal(java.lang.Object message)
Logs fatal message

Parameters:
message - message to log