View Javadoc

1   /*******************************************************************************
2    * Copyright (c) 2007, 2014 Massimiliano Ziccardi
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   *******************************************************************************/
16  package org.slf4j.impl;
17  
18  import org.slf4j.ILoggerFactory;
19  
20  public class StaticLoggerBinder
21  {
22      private static OSGILogFactory s_factory = new OSGILogFactory();
23  
24      /**
25       * The unique instance of this class.
26       * 
27       * @deprecated Please use the {@link #getSingleton()} method instead of
28       *             accessing this field directly. In future versions, this field
29       *             will become private.
30       */
31      @Deprecated
32      public static final StaticLoggerBinder SINGLETON = new StaticLoggerBinder();
33  
34      /**
35       * Return the singleton of this class.
36       * 
37       * @return the StaticLoggerBinder singleton
38       */
39      public static final StaticLoggerBinder getSingleton() {
40          return SINGLETON;
41      }
42  
43      /**
44       * Declare the version of the SLF4J API this implementation is compiled against.
45       * The value of this field is usually modified with each release.
46       */
47      // to avoid constant folding by the compiler, this field must *not* be final
48      public static String REQUESTED_API_VERSION = "1.7.5";  // !final
49  
50      private StaticLoggerBinder()
51      {
52      }
53  
54      public ILoggerFactory getLoggerFactory()
55      {
56          return s_factory;
57      }
58  
59      public String getLoggerFactoryClassStr() {
60          return null;
61      }
62  
63  }