001package org.slf4j.spi; 002 003import org.slf4j.ILoggerFactory; 004import org.slf4j.IMarkerFactory; 005import org.slf4j.LoggerFactory; 006import org.slf4j.MDC; 007 008/** 009 * This interface based on {@link java.util.ServiceLoader} paradigm. 010 * 011 * <p>It replaces the old static-binding mechanism used in SLF4J versions 1.0.x to 1.7.x. 012 * 013 * @author Ceki G¨lc¨ 014 * @since 1.8 015 */ 016public interface SLF4JServiceProvider { 017 018 /** 019 * Return the instance of {@link ILoggerFactory} that 020 * {@link org.slf4j.LoggerFactory} class should bind to. 021 * 022 * @return instance of {@link ILoggerFactory} 023 */ 024 public ILoggerFactory getLoggerFactory(); 025 026 /** 027 * Return the instance of {@link IMarkerFactory} that 028 * {@link org.slf4j.MarkerFactory} class should bind to. 029 * 030 * @return instance of {@link IMarkerFactory} 031 */ 032 public IMarkerFactory getMarkerFactory(); 033 034 /** 035 * Return the instance of {@link MDCAdapter} that 036 * {@link MDC} should bind to. 037 * 038 * @return instance of {@link MDCAdapter} 039 */ 040 public MDCAdapter getMDCAdapter(); 041 042 public String getRequestedApiVersion(); 043 044 /** 045 * Initialize the logging back-end. 046 * 047 * <p><b>WARNING:</b> This method is intended to be called once by 048 * {@link LoggerFactory} class and from nowhere else. 049 * 050 */ 051 public void initialize(); 052}