Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Logback: the reliable, generic, fast and flexible logging framework. Copyright (C) 1999-2011, QOS.ch. All rights reserved. This program and the accompanying materials are dual-licensed under either the terms of the Eclipse Public License v1.0 as published by the Eclipse Foundation or (per the licensee's choosing) under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation.
 
 package org.slf4j.impl;
 
 
The binding of org.slf4j.LoggerFactory class with an actual instance of org.slf4j.ILoggerFactory is performed using information returned by this class.

Author(s):
Ceki Gülcü
 
 public class StaticLoggerBinder implements LoggerFactoryBinder {

  
Declare the version of the SLF4J API this implementation is compiled against. The value of this field is usually modified with each release.
 
   // to avoid constant folding by the compiler, this field must *not* be final
   public static String REQUESTED_API_VERSION = "1.6"// !final
 
   final static String NULL_CS_URL = . + "#null_CS";

  
The unique instance of this class.
 
   private static StaticLoggerBinder SINGLETON = new StaticLoggerBinder();
 
   private static Object KEY = new Object();
 
   static {
     .init();
   }
 
   private boolean initialized = false;
   private final ContextSelectorStaticBinder contextSelectorBinder = ContextSelectorStaticBinder
       .getSingleton();
 
   private StaticLoggerBinder() {
   }
 
   public static StaticLoggerBinder getSingleton() {
     return ;
   }

  
Package access for testing purposes.
 
   static void reset() {
      = new StaticLoggerBinder();
     .init();
   }

  
Package access for testing purposes.
 
   void init() {
     try {
       try {
       } catch (JoranException je) {
         Util.report("Failed to auto configure default logger context"je);
       }
        = true;
     } catch (Throwable t) {
       // we should never get here
       Util.report("Failed to instantiate [" + LoggerContext.class.getName()
           + "]"t);
     }
   }
 
     if (!) {
      return ;
    }
    if (.getContextSelector() == null) {
      throw new IllegalStateException(
          "contextSelector cannot be null. See also " + );
    }
  }
  }
New to GrepCode? Check out our FAQ X