ibis.util
Class GetLogger

java.lang.Object
  extended byibis.util.GetLogger

public class GetLogger
extends java.lang.Object

Utility to obtain a log4j logger even when there is no configuration file.


Method Summary
static org.apache.log4j.Logger getLogger(java.lang.Class cl)
          Creates a log4j logger.
static org.apache.log4j.Logger getLogger(java.lang.Class cl, org.apache.log4j.Level level)
          Creates a log4j logger.
static org.apache.log4j.Logger getLogger(java.lang.String name)
          Creates a log4j logger.
static org.apache.log4j.Logger getLogger(java.lang.String name, org.apache.log4j.Level level)
          Creates a log4j logger.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getLogger

public static org.apache.log4j.Logger getLogger(java.lang.String name)
Creates a log4j logger. If no log4j configuration is found, a default one is created with level WARN and console appender.

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

getLogger

public static org.apache.log4j.Logger getLogger(java.lang.Class cl)
Creates a log4j logger. If no log4j configuration is found, a default one is created with level WARN and console appender.

Parameters:
cl - the class that bears the name of this logger.
Returns:
the logger.

getLogger

public static org.apache.log4j.Logger getLogger(java.lang.String name,
                                                org.apache.log4j.Level level)
Creates a log4j logger. If no log4j configuration is found, a default one is created with the specified level and console appender.

Parameters:
name - the name of this logger.
level - the level of this logger.
Returns:
the logger.

getLogger

public static org.apache.log4j.Logger getLogger(java.lang.Class cl,
                                                org.apache.log4j.Level level)
Creates a log4j logger. If no log4j configuration is found, a default one is created with the specified level and console appender.

Parameters:
cl - the class that bears the name of this logger.
level - the level of this logger.
Returns:
the logger.


The Ibis project