|
JBoss Log Manager 1.2.0.GA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.logmanager.LogContext
public final class LogContext
A logging context, for producing isolated logging environments.
Field Summary | |
---|---|
static LogContextSelector |
DEFAULT_LOG_CONTEXT_SELECTOR
The default log context selector, which always returns the system log context. |
Method Summary | ||
---|---|---|
static LogContext |
create()
Create a new log context. |
|
|
getAttachment(String loggerName,
Logger.AttachmentKey<V> key)
Get a logger attachment for a logger name, if it exists. |
|
Level |
getLevelForName(String name)
Get the level for a name. |
|
static LogContext |
getLogContext()
Get the currently active log context. |
|
Logger |
getLogger(String name)
Get a logger with the given name from this logging context. |
|
Logger |
getLoggerIfExists(String name)
Get a logger with the given name from this logging context, if a logger node exists at that location. |
|
LoggingMXBean |
getLoggingMXBean()
Get the LoggingMXBean associated with this log context. |
|
static LogContext |
getSystemLogContext()
Get the system log context. |
|
void |
registerLevel(Level level)
Register a level instance with this log context. |
|
static void |
setLogContextSelector(LogContextSelector newSelector)
Set a new log context selector. |
|
void |
unregisterLevel(Level level)
Unregister a previously registered level. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final LogContextSelector DEFAULT_LOG_CONTEXT_SELECTOR
Method Detail |
---|
public static LogContext create()
"createLogContext"
RuntimePermission
to invoke this method.
public Logger getLogger(String name)
name
- the logger name
LogManager.getLogger(String)
public Logger getLoggerIfExists(String name)
name
- the logger name
null
if no such logger node existspublic <V> V getAttachment(String loggerName, Logger.AttachmentKey<V> key)
V
- the attachment value typeloggerName
- the logger namekey
- the attachment key
null
if the logger or the attachment does not existpublic LoggingMXBean getLoggingMXBean()
LoggingMXBean
associated with this log context.
LoggingMXBean
instancepublic Level getLevelForName(String name) throws IllegalArgumentException
name
- the name
IllegalArgumentException
- if the name is not knownpublic void registerLevel(Level level)
level
- the level to registerpublic void unregisterLevel(Level level)
level
- the level to unregisterpublic static LogContext getSystemLogContext()
public static LogContext getLogContext()
public static void setLogContextSelector(LogContextSelector newSelector)
"setLogContextSelector"
RuntimePermission
to invoke this method.
newSelector
- the new selector.
|
JBoss Log Manager 1.2.0.GA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |