it.andynaz.log
Class LoggerMgr

java.lang.Object
  extended by it.andynaz.log.LoggerMgr

public class LoggerMgr
extends Object

This class let you create a "default" logger. The default logger is the one specified by tha value "andyLog.defaultLogger" in the shared configuration (see Config for more info). The logger used should have two constructors, the one with no arguments and another one with takes a string.

The logger is created using the shared configuration. If the class specified by the value "andyLog.defaultLogger" does not exist or it is not a Logger, a simple logger is created (the one that uses the standard output).

Version:
2013/01/14
Author:
aagnesse

Constructor Summary
private LoggerMgr()
           
 
Method Summary
static Logger getLogger()
          Returnes a "default" logger without a name.
static Logger getLogger(String name)
          Returnes a "default" logger with a name.
private static Class<Logger> getLoggerClass()
          Returns the class used to create the logger.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggerMgr

private LoggerMgr()
Method Detail

getLogger

public static Logger getLogger()
Returnes a "default" logger without a name.

Returns:
a default logger with no name

getLogger

public static Logger getLogger(String name)
Returnes a "default" logger with a name.

Parameters:
name - the name of the logger
Returns:
a default logger with a name

getLoggerClass

private static Class<Logger> getLoggerClass()
Returns the class used to create the logger.

Returns:
the class used to create the logger


(c) 2013 andynaz - http://andynaz.altervista.org