This ContextSelector chooses a LoggerContext based upon the ClassLoader of the caller. This allows Loggers assigned to static variables to be released along with the classes that own then. Other ContextSelectors will generally cause Loggers associated with classes loaded from different ClassLoaders to be co-mingled. This is a problem if, for example, a web application is undeployed as some of the Loggers being released may be associated with a Class in a parent ClassLoader, which will generally have negative consequences. The main downside to this ContextSelector is that Configuration is more challenging. This ContextSelector should not be used with a Servlet Filter such as the JNDIContextFilter.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.