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