log4j-jboss-logmanager 1.0.2.Final-redhat-1

org.apache.log4j
Class JBossLogManagerFacade

java.lang.Object
  extended by org.apache.log4j.JBossLogManagerFacade

public class JBossLogManagerFacade
extends Object

A simple facade to interact between LogManager and LogManager.

Author:
James R. Perkins

Field Summary
static String JBL_ROOT_NAME
           
static String LOG4J_ROOT_NAME
           
 
Method Summary
static Logger exists(String name)
          Checks the log context for an attached logger.
static org.jboss.logmanager.Logger getJBossLogger(String name)
          Returns a JBoss Log Manger logger.
static Collection<org.jboss.logmanager.Logger> getJBossLoggers()
          Returns a collection of the loggers that exist.
static org.jboss.logmanager.Logger getJBossRootLogger()
          Returns the root JBoss logger from the JBoss log manager.
static Logger getLogger(org.jboss.logmanager.Logger lmLogger)
          Gets the log4j logger that is attached to the JBoss Log Manager logger.
static Logger getLogger(org.apache.log4j.spi.LoggerRepository repository, String name, org.apache.log4j.spi.LoggerFactory factory)
          Gets the logger.
static org.apache.log4j.spi.LoggerRepository getLoggerRepository()
          Locates the log4j logger repository.
static org.apache.log4j.spi.LoggerRepository getLoggerRepository(org.jboss.logmanager.LogContext logContext)
           
static Collection<Logger> getLoggers()
          Returns a collection of the loggers that exist.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG4J_ROOT_NAME

public static final String LOG4J_ROOT_NAME
See Also:
Constant Field Values

JBL_ROOT_NAME

public static final String JBL_ROOT_NAME
See Also:
Constant Field Values
Method Detail

getJBossLogger

public static org.jboss.logmanager.Logger getJBossLogger(String name)
Returns a JBoss Log Manger logger.

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

getLoggerRepository

public static org.apache.log4j.spi.LoggerRepository getLoggerRepository()
Locates the log4j logger repository.

Returns:
the log4j logger repository.

getLoggerRepository

public static org.apache.log4j.spi.LoggerRepository getLoggerRepository(org.jboss.logmanager.LogContext logContext)

getJBossRootLogger

public static org.jboss.logmanager.Logger getJBossRootLogger()
Returns the root JBoss logger from the JBoss log manager.

Returns:
the root logger.

exists

public static Logger exists(String name)
Checks the log context for an attached logger. If the logger is found it is returned, otherwise null is returned.

Parameters:
name - the name of the logger to check.
Returns:
the logger or null if the logger does not exist.

getLogger

public static Logger getLogger(org.jboss.logmanager.Logger lmLogger)
Gets the log4j logger that is attached to the JBoss Log Manager logger. If the logger does not exist, null is returned.

Parameters:
lmLogger - the JBoss Log Manager logger.
Returns:
the logger or null if no logger is attached.

getLogger

public static Logger getLogger(org.apache.log4j.spi.LoggerRepository repository,
                               String name,
                               org.apache.log4j.spi.LoggerFactory factory)
Gets the logger.

Parameters:
repository - the repository the logger should be set to use.
name - the name of the logger.
factory - the factory to create the logger if it does not exist.
Returns:
the logger.

getLoggers

public static Collection<Logger> getLoggers()
Returns a collection of the loggers that exist.

Returns:
a collection of the loggers.

getJBossLoggers

public static Collection<org.jboss.logmanager.Logger> getJBossLoggers()
Returns a collection of the loggers that exist.

Returns:
a collection of the loggers.

log4j-jboss-logmanager 1.0.2.Final-redhat-1

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.