• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package org.slf4j.spi;
2 
3 import org.slf4j.ILoggerFactory;
4 import org.slf4j.IMarkerFactory;
5 import org.slf4j.LoggerFactory;
6 import org.slf4j.MDC;
7 
8 /**
9  * This interface based on {@link java.util.ServiceLoader} paradigm.
10  *
11  * <p>It replaces the old static-binding mechanism used in SLF4J versions 1.0.x to 1.7.x.
12  *
13  * @author Ceki G&uml;lc&uml;
14  * @since 1.8
15  */
16 public interface SLF4JServiceProvider {
17 
18     /**
19      * Return the instance of {@link ILoggerFactory} that
20      * {@link org.slf4j.LoggerFactory} class should bind to.
21      *
22      * @return instance of {@link ILoggerFactory}
23      */
getLoggerFactory()24     public ILoggerFactory getLoggerFactory();
25 
26     /**
27      * Return the instance of {@link IMarkerFactory} that
28      * {@link org.slf4j.MarkerFactory} class should bind to.
29      *
30      * @return instance of {@link IMarkerFactory}
31      */
getMarkerFactory()32     public IMarkerFactory getMarkerFactory();
33 
34     /**
35      * Return the instance of {@link MDCAdapter} that
36      * {@link MDC} should bind to.
37      *
38      * @return instance of {@link MDCAdapter}
39      */
getMDCAdapter()40     public MDCAdapter getMDCAdapter();
41 
42     /**
43      * Return the maximum API version for SLF4J that the logging
44      * implementation supports.
45      *
46      * <p>For example: {@code "2.0.1"}.
47      *
48      * @return the string API version.
49      */
getRequestedApiVersion()50     public String getRequestedApiVersion();
51 
52     /**
53      * Initialize the logging back-end.
54      *
55      * <p><b>WARNING:</b> This method is intended to be called once by
56      * {@link LoggerFactory} class and from nowhere else.
57      *
58      */
initialize()59     public void initialize();
60 }
61