private void loadMapper(Configuration configuration, String mapperName) { InputStream input = null; try { input = getClass().getResourceAsStream("/" + mapperName.replace('.', '/') + ".xml"); new XMLMapperBuilder(input, configuration, mapperName, configuration.getSqlFragments()) .parse(); configuration.addLoadedResource(mapperName); logback.setLoggerLevel(mapperName, Level.INFO); } catch (Exception e) { throw new IllegalArgumentException("Unable to load mapper " + mapperName, e); } finally { Closeables.closeQuietly(input); } }
LoggingConfiguration configure() { Logback.configure("/org/sonar/batch/bootstrapper/logback.xml", substitutionVariables); return this; }
LoggingConfiguration configure(File logbackFile) { Logback.configure(logbackFile, substitutionVariables); return this; }
LoggingConfiguration configure(String classloaderPath) { Logback.configure(classloaderPath, substitutionVariables); return this; }