LogContextSelectorpublic final class ContextClassLoaderLogContextSelector extends java.lang.Object implements LogContextSelector
| Constructor | Description |
|---|---|
ContextClassLoaderLogContextSelector() |
Construct a new instance.
|
ContextClassLoaderLogContextSelector(LogContextSelector defaultSelector) |
Construct a new instance.
|
| Modifier and Type | Method | Description |
|---|---|---|
LogContext |
getLogContext() |
Get the current log context.
|
void |
registerLogContext(java.lang.ClassLoader classLoader,
LogContext logContext) |
Register a class loader with a log context.
|
boolean |
unregisterLogContext(java.lang.ClassLoader classLoader,
LogContext logContext) |
Unregister a class loader/log context association.
|
public ContextClassLoaderLogContextSelector(LogContextSelector defaultSelector)
defaultSelector - the selector to consult if no matching log context is foundpublic ContextClassLoaderLogContextSelector()
public LogContext getLogContext()
LogContextSelectorgetLogContext in interface LogContextSelectorpublic void registerLogContext(java.lang.ClassLoader classLoader,
LogContext logContext)
throws java.lang.IllegalArgumentException
registerLogContext RuntimePermission.classLoader - the classloaderlogContext - the log contextjava.lang.IllegalArgumentException - if the classloader is already associated with a log contextpublic boolean unregisterLogContext(java.lang.ClassLoader classLoader,
LogContext logContext)
unregisterLogContext RuntimePermission.classLoader - the classloaderlogContext - the log contexttrue if the association exists and was removed, false otherwiseCopyright © 2018. All rights reserved.