示例#1
0
 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);
   }
 }
示例#2
0
 LoggingConfiguration configure() {
   Logback.configure("/org/sonar/batch/bootstrapper/logback.xml", substitutionVariables);
   return this;
 }
示例#3
0
 LoggingConfiguration configure(File logbackFile) {
   Logback.configure(logbackFile, substitutionVariables);
   return this;
 }
示例#4
0
 LoggingConfiguration configure(String classloaderPath) {
   Logback.configure(classloaderPath, substitutionVariables);
   return this;
 }