<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
We certainly have relied on it up until now, but it looks like we can put the logic from our custom ContextSelector into an SLF4JServiceProvider.<div><br></div><div>Thanks for your help!</div><div><br></div><div>BR,</div><div><br></div><div>Richard</div><blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
<p style="color: #AAAAAA; margin-top: 10px;">On 6/9/2023 2:04:04 PM, logback developers list via logback-dev <logback-dev@qos.ch> wrote:</p><div style="font-family:Arial,Helvetica,sans-serif">Currently, ContextSelector is not used and is considered vestigial. It<br>can be reintroduced depending on user interest.<br><br>On 6/9/2023 7:59 PM, logback developers list via logback-dev wrote:<br>> Does that mean that ContextSelector will be removed entirely at some point?<br>>><br>>> On 6/9/2023 1:51:45 PM, logback developers list via logback-dev<br>>> <logback-dev@qos.ch> wrote:<br>>><br>>><br>>> During 1.3 development, there was a simplification effort and support<br>>> for context selectors was dropped due to lack of interest.<br>>><br>>> Having said this, you can create your own implementation of<br>>> SLF4JServiceProvider overriding LogbackServiceProvider.<br>>><br>>><br>>> On 6/9/2023 7:27 PM, logback developers list via logback-dev wrote:<br>>> > Yeah my issue is that I have a unit test that checks if<br>>> > ContextSelectorStaticBinder is properly configured to return our custom<br>>> > ContextSelector and I'm not sure what to replace that with.<br>>> ><br>>> > ContextSelector selector =<br>>> > ContextSelectorStaticBinder.getSingleton().getContextSelector();<br>>> > assertTrue(selector instanceof FrameworkLoggerContextSelector);<br>>> ><br>>> > getContextSelector() now returns null in my unit test.<br>>> ><br>>> > BR,<br>>> ><br>>> > Richard<br>>> >><br>>> >> On 6/9/2023 1:07:26 PM, logback developers list via logback-dev<br>>> >> wrote:<br>>> >><br>>> >><br>>> >> Hello Richard,<br>>> >><br>>> >> StaticLoggerBinder has been replaced by<br>>> >> org.slf4j.spi.SLF4JServiceProvider of which LogbackServiceProvider<br>>> is an<br>>> >> implementation.<br>>> >><br>>> >> SLF4JServiceProvider interface has a method called initialize().<br>>> >><br>>> >> Is this what you were asking?<br>>> >><br>>> >> --<br>>> >> Ceki Gülcü<br>>> >><br>>> >> Sponsoring SLF4J/logback/reload4j at https://github.com/sponsors/qos-ch<br>>> >><br>>> >> On 6/9/2023 7:01 PM, logback developers list via logback-dev wrote:<br>>> >> > Before 1.3, the class StaticLoggerBinder had an init method that<br>>> would<br>>> >> > in turn call the init method on the singleton ContextSelectorBinder:<br>>> >> ><br>>> >> > contextSelectorBinder.init(defaultLoggerContext, KEY);<br>>> >> ><br>>> >> > -Richard<br>>> >> > 48c29399-04ec-4cd1-8794-c7507a7d5ded<br>>> >> _______________________________________________<br>>> >> logback-dev mailing list<br>>> >> logback-dev@qos.ch<br>>> >> https://mailman.qos.ch/cgi-bin/mailman/listinfo/logback-dev<br>>> > 17fa5a94-06c8-464e-bde9-1843e17d88e4<br>>> ><br>>> > _______________________________________________<br>>> > logback-dev mailing list<br>>> > logback-dev@qos.ch<br>>> > https://mailman.qos.ch/cgi-bin/mailman/listinfo/logback-dev<br>>><br>>> -- <br>>> Ceki Gülcü<br>>><br>>> Sponsoring SLF4J/logback/reload4j at https://github.com/sponsors/qos-ch<br>>> _______________________________________________<br>>> logback-dev mailing list<br>>> logback-dev@qos.ch<br>>> https://mailman.qos.ch/cgi-bin/mailman/listinfo/logback-dev<br>> 653eb924-9acd-40d5-8a50-ec40d5128862<br>> <br>> _______________________________________________<br>> logback-dev mailing list<br>> logback-dev@qos.ch<br>> https://mailman.qos.ch/cgi-bin/mailman/listinfo/logback-dev<br><br>-- <br>Ceki Gülcü<br><br>Sponsoring SLF4J/logback/reload4j at https://github.com/sponsors/qos-ch<br>_______________________________________________<br>logback-dev mailing list<br>logback-dev@qos.ch<br>https://mailman.qos.ch/cgi-bin/mailman/listinfo/logback-dev</logback-dev@qos.ch></div></blockquote></div><img class="mailbird" width="1" height="1" style="border:0; width:1; height:1; display: none;" src="https://tracking.getmailbird.com/OpenTrackingPixel/?messageId=Mailbird-28702e4b-1b3f-4526-b56e-671f9c8ba5b4@idfconnect.com&senderHash=D6ED44D59BDB7BF65537969234F1652749304BFD29C84F7B7F72DC62F12A74D6&recipientHash=F1ACC2A55C5C33DCFD3E75C58B62F0B1CC3C381818FBC188475D1D2589A71308&internalId=8ad4e9e0-a72f-4e2e-aa2f-189be27e6f89" alt="a636fbe9-aed4-45b7-b697-376e6da57e3b">