public TomcatSlf4jLogbackFactoryAccessor(ClassLoader cl) throws ClassNotFoundException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
  Class clazz=cl.loadClass("org.apache.juli.logging.org.slf4j.impl.StaticLoggerBinder");
  Method getSingleton=MethodUtils.getAccessibleMethod(clazz,"getSingleton",new Class[0]);
  Object singleton=getSingleton.invoke(null);
  Method getLoggerFactory=MethodUtils.getAccessibleMethod(clazz,"getLoggerFactory",new Class[0]);
  Object loggerFactory=getLoggerFactory.invoke(singleton);
  Class loggerFactoryClass=cl.loadClass("org.apache.juli.logging.ch.qos.logback.classic.LoggerContext");
  if (!loggerFactoryClass.isInstance(loggerFactory)) {
    throw new RuntimeException("The singleton SLF4J binding was not Logback");
  }
  setTarget(loggerFactory);
}

public TomcatSlf4jLogbackFactoryAccessor ( ClassLoader cl ) throws ClassNotFoundException , IllegalAccessException , IllegalArgumentException , InvocationTargetException { Class clazz = cl . loadClass ( "org.apache.juli.logging.org.slf4j.impl.StaticLoggerBinder" ) ; Method getSingleton = MethodUtils . getAccessibleMethod ( clazz , "getSingleton" , new Class [ 0 ] ) ; Object singleton = getSingleton . invoke ( null ) ; Method getLoggerFactory = MethodUtils . getAccessibleMethod ( clazz , "getLoggerFactory" , new Class [ 0 ] ) ; Object loggerFactory = getLoggerFactory . invoke ( singleton ) ; Class loggerFactoryClass = cl . loadClass ( "org.apache.juli.logging.ch.qos.logback.classic.LoggerContext" ) ; if ( ! loggerFactoryClass . isInstance ( loggerFactory ) ) { throw new RuntimeException ( "The singleton SLF4J binding was not Logback" ) ; } setTarget ( loggerFactory ) ; }
attempts to initialize a tomcatslf4jlogback logger factory via the given class loader .
