[slf4j-dev] [JIRA] (SLF4J-450) Allow binding to be explicitly specified

QOS.CH (JIRA) noreply-jira at qos.ch
Mon Dec 17 21:29:00 CET 2018


Chris Lee created SLF4J-450:
-------------------------------

             Summary: Allow binding to be explicitly specified
                 Key: SLF4J-450
                 URL: https://jira.qos.ch/browse/SLF4J-450
             Project: SLF4J
          Issue Type: Improvement
          Components: Core API
    Affects Versions: 1.8.0-beta2
            Reporter: Chris Lee
            Assignee: SLF4J developers list


Currently SLF4J (1.8+) uses ServiceLoader to find bindings; as an improvement for performance sensitive (or otherwise restricted) environments allow the binding to be explicitly specified.

For example:
{code:java}
-Dslf4j.binding=ch.qos.logback.classic.spi.LogbackServiceProvider{code}
In the event this property isn't specified then logic could fall-through to existing ServiceLoader behaviour.

Examples of where this would be valuable:

1) Cloud functions sensitive to cold-start times (e.g. AWS Lambda).  Avoiding scanning the classpath reduces startup time (and hence request processing time for requests incurring a cold start).  This is the my use case.

2) Class-loader challenged environments where ServiceLoader may not behave as expected; specifying the precise class to load may allow for workarounds.



--
This message was sent by Atlassian JIRA
(v7.3.1#73012)


More information about the slf4j-dev mailing list