org.base.apps.util.config
Class LogManager

java.lang.Object
  extended by org.base.apps.util.config.LogManager

public class LogManager
extends Object

Singleton factory to acquire application-specific loggers.

Author:
Kevan Simpson

Constructor Summary
LogManager()
           
 
Method Summary
static void configure()
          Configure this LogFactory with a log4j.xml file, which is expected to be in the runtime classpath.
static void configure(ResourceManager rsrcMgr)
          Configure this LogFactory with the given ResourceManager, which is expected to have a property named "log4j.file".
static void configure(String cfgFile)
          Configure this LogFactory with the given configuration file.
static org.apache.commons.logging.Log getLogger(Class<?> clz)
          Returns an instance of the commons logger registered to the specified class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogManager

public LogManager()
Method Detail

configure

public static void configure(ResourceManager rsrcMgr)
Configure this LogFactory with the given ResourceManager, which is expected to have a property named "log4j.file".

Parameters:
rsrcMgr - The given configurator.

configure

public static void configure()
Configure this LogFactory with a log4j.xml file, which is expected to be in the runtime classpath.


configure

public static void configure(String cfgFile)
Configure this LogFactory with the given configuration file.

Parameters:
cfgFile - The given configuration file.

getLogger

public static org.apache.commons.logging.Log getLogger(Class<?> clz)
Returns an instance of the commons logger registered to the specified class.

Parameters:
clz - The logging class.
Returns:
A commons logger.

Please visit Base Apps, hosted on Sourceforge.net.

Copyright 2011, Blue Agate Software Entity (BASE)