Uploaded image for project: 'SLF4J'
  1. SLF4J
  2. SLF4J-450

Allow binding to be explicitly specified

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • 2.0.9
    • 1.8.0-beta2
    • Core API
    • None
    • normal
    • P3

    Description

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

      For example:

      -Dslf4j.provider=ch.qos.logback.classic.spi.LogbackServiceProvider

      In the event this property isn't specified then logic could fall-through to existing ServiceLoader behavior.

      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.

      Attachments

        Activity

          People

            ceki Ceki Gülcü
            cslee00 Chris Lee
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: