public class JBossLogManagerFacade
extends java.lang.Object
LogManager and LogManager.| Modifier and Type | Class and Description |
|---|---|
private static class |
JBossLogManagerFacade.LoggerComparator |
private static class |
JBossLogManagerFacade.LoggerNode |
| Modifier and Type | Field and Description |
|---|---|
private static org.jboss.logmanager.Logger.AttachmentKey<Hierarchy> |
HIERARCHY_KEY |
static java.lang.String |
JBL_ROOT_NAME |
private static java.security.PrivilegedAction<org.jboss.logmanager.LogContext> |
LOG_CONTEXT_ACTION |
static java.lang.String |
LOG4J_ROOT_NAME |
private static org.jboss.logmanager.Logger.AttachmentKey<Logger> |
LOGGER_KEY |
private static org.jboss.logmanager.Logger.AttachmentKey<JBossLogManagerFacade.LoggerNode> |
LOGGER_NODE_KEY |
| Modifier | Constructor and Description |
|---|---|
private |
JBossLogManagerFacade() |
| Modifier and Type | Method and Description |
|---|---|
private static <T> T |
attachIfAbsent(org.jboss.logmanager.Logger logger,
org.jboss.logmanager.Logger.AttachmentKey<T> key,
T value) |
private static <T> T |
doPrivileged(java.security.PrivilegedAction<T> action) |
(package private) static Logger |
exists(java.lang.String name)
Checks the log context for an attached logger.
|
private static <T> T |
getAttachment(org.jboss.logmanager.Logger logger,
org.jboss.logmanager.Logger.AttachmentKey<T> key) |
(package private) static org.jboss.logmanager.Logger |
getJBossLogger(org.jboss.logmanager.LogContext logContext,
java.lang.String name)
Returns a JBoss Log Manger logger.
|
(package private) static org.jboss.logmanager.Logger |
getJBossLogger(java.lang.String name)
Returns a JBoss Log Manger logger.
|
private static org.jboss.logmanager.LogContext |
getLogContext() |
(package private) static Logger |
getLogger(org.jboss.logmanager.Logger lmLogger)
Gets the log4j logger that is attached to the JBoss Log Manager logger.
|
(package private) static org.apache.log4j.spi.LoggerRepository |
getLoggerRepository()
Gets the log4j logger repository using the default log context.
|
static org.apache.log4j.spi.LoggerRepository |
getLoggerRepository(org.jboss.logmanager.LogContext logContext)
Gets the log4j logger repository for the log context.
|
(package private) static java.util.Collection<Logger> |
getLoggers()
Returns a collection of the loggers that exist.
|
(package private) static Logger |
getOrCreateLogger(org.apache.log4j.spi.LoggerRepository repository,
java.lang.String name,
org.apache.log4j.spi.LoggerFactory factory)
Gets the logger or creates the logger via the .
|
private static void |
updateChildren(JBossLogManagerFacade.LoggerNode loggerNode,
Logger logger) |
private static void |
updateParents(org.apache.log4j.spi.LoggerRepository repository,
Logger cat,
org.jboss.logmanager.Logger parentLogger)
This method is not thread safe.
|
public static final java.lang.String LOG4J_ROOT_NAME
public static final java.lang.String JBL_ROOT_NAME
private static final org.jboss.logmanager.Logger.AttachmentKey<Logger> LOGGER_KEY
private static final org.jboss.logmanager.Logger.AttachmentKey<Hierarchy> HIERARCHY_KEY
private static final org.jboss.logmanager.Logger.AttachmentKey<JBossLogManagerFacade.LoggerNode> LOGGER_NODE_KEY
private static final java.security.PrivilegedAction<org.jboss.logmanager.LogContext> LOG_CONTEXT_ACTION
static org.jboss.logmanager.Logger getJBossLogger(java.lang.String name)
name - the name of the logger.static org.jboss.logmanager.Logger getJBossLogger(org.jboss.logmanager.LogContext logContext,
java.lang.String name)
name - the name of the logger.static org.apache.log4j.spi.LoggerRepository getLoggerRepository()
public static org.apache.log4j.spi.LoggerRepository getLoggerRepository(org.jboss.logmanager.LogContext logContext)
logContext - the log context which the log4j repository is located on or should be created on or null to create the repository on the default log contextstatic Logger exists(java.lang.String name)
null is
returned.name - the name of the logger to check.null if the logger does not exist.static Logger getLogger(org.jboss.logmanager.Logger lmLogger)
null is returned.lmLogger - the JBoss Log Manager logger.null if no logger is attached.static Logger getOrCreateLogger(org.apache.log4j.spi.LoggerRepository repository, java.lang.String name, org.apache.log4j.spi.LoggerFactory factory)
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.static java.util.Collection<Logger> getLoggers()
private static void updateParents(org.apache.log4j.spi.LoggerRepository repository,
Logger cat,
org.jboss.logmanager.Logger parentLogger)
private static void updateChildren(JBossLogManagerFacade.LoggerNode loggerNode, Logger logger)
private static org.jboss.logmanager.LogContext getLogContext()
private static <T> T getAttachment(org.jboss.logmanager.Logger logger,
org.jboss.logmanager.Logger.AttachmentKey<T> key)
private static <T> T attachIfAbsent(org.jboss.logmanager.Logger logger,
org.jboss.logmanager.Logger.AttachmentKey<T> key,
T value)
private static <T> T doPrivileged(java.security.PrivilegedAction<T> action)