View Javadoc

1   package org.slf4j.helpers;
2   
3   import org.slf4j.ILoggerFactory;
4   import org.slf4j.IMarkerFactory;
5   import org.slf4j.spi.MDCAdapter;
6   import org.slf4j.spi.SLF4JServiceProvider;
7   
8   public class NOPServiceProvider implements SLF4JServiceProvider {
9   
10  	/**
11  	 * Declare the version of the SLF4J API this implementation is compiled
12  	 * against. The value of this field is modified with each major release.
13  	 */
14  	// to avoid constant folding by the compiler, this field must *not* be final
15  	public static String REQUESTED_API_VERSION = "1.8.99"; // !final
16  
17  	private ILoggerFactory loggerFactory = new NOPLoggerFactory();
18  	private IMarkerFactory markerFactory =  new BasicMarkerFactory();
19  	private MDCAdapter mdcAdapter =  new NOPMDCAdapter();
20  
21  	public ILoggerFactory getLoggerFactory() {
22  		return loggerFactory;
23  	}
24  
25  	public IMarkerFactory getMarkerFactory() {
26  		return markerFactory;
27  	}
28  
29  	public MDCAdapter getMDCAdapter() {
30  		return mdcAdapter;
31  	}
32  
33  	public String getRequesteApiVersion() {
34  		return REQUESTED_API_VERSION;
35  	}
36  
37  	@Override
38  	public void initialize() {
39  		// already initialized
40  	}
41  }