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&uml;lc&uml;
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    /**
043     * Return the maximum API version for SLF4J that the logging
044     * implementation supports.
045     *
046     * <p>For example: {@code "2.0.1"}.
047     *
048     * @return the string API version.
049     */
050    public String getRequestedApiVersion();
051
052    /**
053     * Initialize the logging back-end.
054     * 
055     * <p><b>WARNING:</b> This method is intended to be called once by 
056     * {@link LoggerFactory} class and from nowhere else. 
057     * 
058     */
059    public void initialize();
060}