[logback-user] Is ContextSelector no longer used in 1.4?

Michael Banks mbanks at progress.com
Thu Oct 12 18:47:17 UTC 2023


We have recently updated to 1.4.11.  Previously, we used the ContextJNDISelector for logging separation.

In the latest LogbackServiceProvider, the code to make use of a ContextSelector is commented out and the defaultLoggerContext is always returned.

    public ILoggerFactory getLoggerFactory() {
        return defaultLoggerContext;

//        if (!initialized) {
//            return defaultLoggerContext;
//
//
//        if (contextSelectorBinder.getContextSelector() == null) {
//            throw new IllegalStateException("contextSelector cannot be null. See also " + NULL_CS_URL);
//        }
//        return contextSelectorBinder.getContextSelector().getLoggerContext();
    }


Is the concept of a ContextSelector now removed?  Is there another mechanism for doing custom context selection?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20231012/14ce88b8/attachment-0001.htm>


More information about the logback-user mailing list