public class ContextJNDISelector extends java.lang.Object implements ContextSelector
To add in catalina.sh
JAVA_OPTS="$JAVA_OPTS "-Dlogback.ContextSelector=JNDI""
Constructor and Description |
---|
ContextJNDISelector(LoggerContext context) |
Modifier and Type | Method and Description |
---|---|
LoggerContext |
detachLoggerContext(java.lang.String loggerContextName) |
java.util.List<java.lang.String> |
getContextNames() |
int |
getCount()
Returns the number of managed contexts Used for testing purposes
|
LoggerContext |
getDefaultLoggerContext() |
LoggerContext |
getLoggerContext() |
LoggerContext |
getLoggerContext(java.lang.String name) |
void |
removeLocalContext() |
void |
setLocalContext(LoggerContext context)
These methods are used by the LoggerContextFilter.
|
public ContextJNDISelector(LoggerContext context)
public LoggerContext getDefaultLoggerContext()
getDefaultLoggerContext
in interface ContextSelector
public LoggerContext detachLoggerContext(java.lang.String loggerContextName)
detachLoggerContext
in interface ContextSelector
public LoggerContext getLoggerContext()
getLoggerContext
in interface ContextSelector
public java.util.List<java.lang.String> getContextNames()
getContextNames
in interface ContextSelector
public LoggerContext getLoggerContext(java.lang.String name)
getLoggerContext
in interface ContextSelector
public int getCount()
public void setLocalContext(LoggerContext context)
They provide a way to tell the selector which context to use, thus saving the cost of a JNDI call at each new request.
context
- public void removeLocalContext()
Copyright © 2010 - 2023 Adobe. All Rights Reserved