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)
_______________________________________________
slf4j-dev mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/slf4j-dev

Reply via email to