| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| private final ConcurrentMap | |
| private final LogContextSelector | |
| private static final Permission | |
| private final Set | |
| private final PrivilegedAction | |
| private final Function | |
| private static final Permission | |
| private static final Permission |
| Access | Constructor and Description |
|---|---|
| public | ClassLoaderLogContextSelector(final LogContextSelector
the selector to consult if no matching log context is found defaultSelector)Construct a new instance. |
| public | ClassLoaderLogContextSelector(final LogContextSelector
the selector to consult if no matching log context is found defaultSelector, final boolean true if the log context could not
found for the class loader and the parent class
loader should be checkedConstruct a new instance. |
| public | |
| public | ClassLoaderLogContextSelector(final boolean
true if the log context could not
found for the class loader and the parent class
loader should be checkedConstruct a new instance. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if this class loader was previously unknown, or false if it was already registeredthe API class loader apiClassLoader)Register a class loader which is a known log API, and thus should be skipped over when searching for the log context to use for the caller class. |
| public LogContext | getLogContext()
Implements org. Get the current log context. |
| public void | registerLogContext(ClassLoader
the classloader classLoader, LogContext the log context logContext)Register a class loader with a log context. |
| public boolean | Returns: true if the class loader was removed, or false if it was not known to this selectorthe API class loader apiClassLoader)Remove a class loader from the known log APIs set. |
| public boolean | Returns: true if the association exists and was removed, false otherwisethe classloader classLoader, LogContext the log context logContext)Unregister a class loader/log context association. |
| checkParentClassLoaders | back to summary |
|---|---|
| private final boolean checkParentClassLoaders | |
| contextMap | back to summary |
|---|---|
| private final ConcurrentMap<ClassLoader, LogContext> contextMap | |
| defaultSelector | back to summary |
|---|---|
| private final LogContextSelector defaultSelector | |
| LOG_API_PERMISSION | back to summary |
|---|---|
| private static final Permission LOG_API_PERMISSION | |
| logApiClassLoaders | back to summary |
|---|---|
| private final Set<ClassLoader> logApiClassLoaders | |
| logContextAction | back to summary |
|---|---|
| private final PrivilegedAction<LogContext> logContextAction | |
| logContextFinder | back to summary |
|---|---|
| private final Function<ClassLoader, LogContext> logContextFinder | |
| REGISTER_LOG_CONTEXT_PERMISSION | back to summary |
|---|---|
| private static final Permission REGISTER_LOG_CONTEXT_PERMISSION | |
| UNREGISTER_LOG_CONTEXT_PERMISSION | back to summary |
|---|---|
| private static final Permission UNREGISTER_LOG_CONTEXT_PERMISSION | |
| ClassLoaderLogContextSelector | back to summary |
|---|---|
| public ClassLoaderLogContextSelector(final LogContextSelector defaultSelector) Construct a new instance. If no matching log context is found, the provided default selector is consulted.
| |
| ClassLoaderLogContextSelector | back to summary |
|---|---|
| public ClassLoaderLogContextSelector(final LogContextSelector defaultSelector, final boolean checkParentClassLoaders) Construct a new instance. If no matching log context is found, the provided default selector is consulted.
If the
| |
| ClassLoaderLogContextSelector | back to summary |
|---|---|
| public ClassLoaderLogContextSelector() Construct a new instance. If no matching log context is found, the system context is used. | |
| ClassLoaderLogContextSelector | back to summary |
|---|---|
| public ClassLoaderLogContextSelector(final boolean checkParentClassLoaders) Construct a new instance. If no matching log context is found, the system context is used.
If the
| |
| addLogApiClassLoader | back to summary |
|---|---|
| public boolean addLogApiClassLoader(ClassLoader apiClassLoader) Register a class loader which is a known log API, and thus should be skipped over when searching for the log context to use for the caller class.
| |
| getLogContext | back to summary |
|---|---|
| public LogContext getLogContext() Implements org. Doc from org. Get the current log context. This instance will consult the call stack to see if any calling classloader is associated with any log context.
| |
| registerLogContext | back to summary |
|---|---|
| public void registerLogContext(ClassLoader classLoader, LogContext logContext) throws IllegalArgumentException Register a class loader with a log context. This method requires the
| |
| removeLogApiClassLoader | back to summary |
|---|---|
| public boolean removeLogApiClassLoader(ClassLoader apiClassLoader) Remove a class loader from the known log APIs set.
| |
| unregisterLogContext | back to summary |
|---|---|
| public boolean unregisterLogContext(ClassLoader classLoader, LogContext logContext) Unregister a class loader/log context association. This method requires the
| |