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

Allow binding to be explicitly specified

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.8.0-beta2
    • Fix Version/s: 1.8.0-beta5
    • Component/s: Core API
    • Labels:
      None
    • Severity:
      normal
    • Priority:
      P3

      Description

      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:

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

      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.

        Attachments

          Activity

            People

            • Assignee:
              slf4j-dev SLF4J developers list
              Reporter:
              cslee00 Chris Lee
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: