code: public static void configure(InputStream is) {
  
  		ClassLoader cl = Thread.currentThread().getContextClassLoader();
  
  		try {
  
  			String[] names = {
  				"ch.qos.logback.classic.LoggerContext",
  				"ch.qos.logback.classic.joran.JoranConfigurator",
  			};
  			for (String name : names) {
  				Class.forName(name, false, cl);
  			}
  
  			ch.qos.logback.classic.LoggerContext context = (ch.qos.logback.classic.LoggerContext) LoggerFactory.getILoggerFactory();
  			ch.qos.logback.classic.joran.JoranConfigurator configurator = new ch.qos.logback.classic.joran.JoranConfigurator();
  			configurator.setContext(context);
  			context.reset();
  			configurator.doConfigure(is);
  
  		} catch (ClassNotFoundException e) {
  			System.err.println("WLogC: Logback JARs are missing in classpath");
  		} catch (NoClassDefFoundError e) {
  			System.err.println("WLogC: Logback JARs are missing in classpath");
  		} catch (Throwable e) {
  			e.printStackTrace();
  		}
  	}
docs: Configure SLF4J.
  
  @param is input stream to logback configuration xml