org.slf4j
Class LoggerFactory

java.lang.Object
  extended by org.slf4j.LoggerFactory

public final class LoggerFactory
extends Object

The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for NLOG4J and JDK 1.4 logging. Other implementations such as NOPLogger and SimpleLogger are also supported.

LoggerFactory is essentially a wrapper around an ILoggerFactory instance bound with LoggerFactory at compile time.

Please note that all methods in LoggerFactory are static.

Author:
Ceki Gülcü

Method Summary
static ContextSelector getContextSelector()
          Return the ContextSelector instance in use.
static ILoggerFactory getILoggerFactory()
          Return the ILoggerFactory instance in use.
static Logger getLogger(Class clazz)
          Return a logger named corresponding to the class passed as parameter, using the statically bound ILoggerFactory instance.
static Logger getLogger(String name)
          Return a logger named according to the name parameter using the statically bound ILoggerFactory instance.
static void setup()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getLogger

public static Logger getLogger(String name)
Return a logger named according to the name parameter using the statically bound ILoggerFactory instance.

Parameters:
name - The name of the logger.
Returns:
logger

getLogger

public static Logger getLogger(Class clazz)
Return a logger named corresponding to the class passed as parameter, using the statically bound ILoggerFactory instance.

Parameters:
clazz - the returned logger will be named after clazz
Returns:
logger

getILoggerFactory

public static ILoggerFactory getILoggerFactory()
Return the ILoggerFactory instance in use.

ILoggerFactory instance is bound with this class at compile time.

Returns:
the ILoggerFactory instance in use

getContextSelector

public static ContextSelector getContextSelector()
Return the ContextSelector instance in use.

Returns:
the ContextSelector instance in use

setup

public static void setup()


Copyright © 2005-2007 QOS.ch. All Rights Reserved.