private static final Logger LOG = LoggerFactory.getLogger(StatementWebService.class);
322880
@POST
    @Path("close")    
    public void close(String id) {
    	Statement statement = StatementHolder.get().get(id);
    	try {
			statement.close();
			StatementHolder.get().remove(id);
		} catch (SQLException e) {
			// TODO
			throw new RuntimeException(e);
		}		
    }
425085
public static MjdbcLogger getLogger(Class clazz) {
        MjdbcLogger mjdbcLogger = new MjdbcLogger(clazz.getName(), null);

        if (isSLF4jAvailable() == true) {
            try {
                mjdbcLogger = new MjdbcLogger(clazz.getName(), null);
                mjdbcLogger.setSlfLogger(MappingUtils.invokeStaticFunction(Class.forName("org.slf4j.LoggerFactory"), "getLogger", new Class[]{Class.class}, new Object[]{clazz}));
            } catch (MjdbcException e) {
                setSLF4jAvailable(false);
            } catch (ClassNotFoundException e) {
                setSLF4jAvailable(false);
            }
        }

        return mjdbcLogger;
    }
991602
public static MjdbcLogger getLogger(String name) {
        MjdbcLogger mjdbcLogger = new MjdbcLogger(name, null);

        if (isSLF4jAvailable() == true) {
            try {
                mjdbcLogger = new MjdbcLogger(name, null);
                mjdbcLogger.setSlfLogger(MappingUtils.invokeStaticFunction(Class.forName("org.slf4j.LoggerFactory"), "getLogger", new Class[]{String.class}, new Object[]{name}));
            } catch (MjdbcException e) {
                setSLF4jAvailable(false);
            } catch (ClassNotFoundException e) {
                setSLF4jAvailable(false);
            }
        }

        return mjdbcLogger;
    }
663580
@Override
  public Logger getLogger(String name) {
    String tag = createTag(name);
    Logger logger = loggerMap.get(tag);
    if (logger == null) {
      Logger newInstance = new TimberLoggerAdapter(tag);
      Logger oldInstance = loggerMap.putIfAbsent(tag, newInstance);
      logger = oldInstance == null ? newInstance : oldInstance;
    }
    return logger;
  }
770547
@SuppressWarnings("unchecked")
	public static <T, L extends LoggerInformer> L getLogger(String name) {
		return (L)SLF4JLoggerFactory.getLogger(name);
	}
1085633
protected static boolean initializeLogging() {
        try {

            // initial logging config, used before anything else
            {
                final URL url = Main.class.getResource("log4j-initial.xml");
                assert url != null;
                DOMConfigurator.configure(url);
            }

            if (ClassLoaderUtils.IS_WEB_START) {
                final URL url = Main.class.getResource("log4j-jnlp.xml");
                assert url != null;
                println("Using JNLP log configuration: " + url);
                DOMConfigurator.configure(url);
                return true;
            }

            final File dataCleanerHome = DataCleanerHome.getAsFile();
            if (initializeLoggingFromDirectory(dataCleanerHome)) {
                return true;
            }

            if (initializeLoggingFromDirectory(new File("."))) {
                return true;
            }

            // fall back to default log4j.xml file in classpath
            final URL url = Main.class.getResource("log4j-default.xml");
            assert url != null;
            println("Using default log configuration: " + url);
            DOMConfigurator.configure(url);
            return false;

        } catch (final NoClassDefFoundError e) {
            // can happen if log4j is not on the classpath
            println("Failed to initialize logging, class not found: " + e.getMessage());
            return false;
        }
    }
1081165
@NotNull
	public static ILogger getLogger(@Nullable ILogger logger) {
		return logger == null ? new NullLogger() : logger;
	}
186711
@Override
	public void logp(Level level, String sourceClass, String sourceMethod, Throwable thrown,
			Supplier<String> msgSupplier) {
		
		super.logp(level, sourceClass, sourceMethod, thrown, maskPassword(msgSupplier));
	}
330326
private static <T> T getChild(StatementTree tree, final Class<T> clazz) {
    return tree.accept(
        new SimpleTreeVisitor<T, Void>() {
          @Override
          protected T defaultAction(Tree node, Void p) {
            if (clazz.isInstance(node)) {
              return clazz.cast(node);
            }
            return null;
          }

          @Override
          public T visitBlock(BlockTree node, Void p) {
            return visit(node.getStatements());
          }

          private T visit(List<? extends Tree> tx) {
            for (Tree t : tx) {
              T r = t.accept(this, null);
              if (r != null) {
                return r;
              }
            }
            return null;
          }
        },
        null);
  }
1025003
public static ILoggerFactory getILoggerFactory() {
        if (INITIALIZATION_STATE == UNINITIALIZED) {
            synchronized (LoggerFactory.class) {
                if (INITIALIZATION_STATE == UNINITIALIZED) {
                    INITIALIZATION_STATE = ONGOING_INITIALIZATION;
                    performInitialization();
                }
            }
        }
        switch (INITIALIZATION_STATE) {
        case SUCCESSFUL_INITIALIZATION:
            return StaticLoggerBinder.getSingleton().getLoggerFactory();
        case NOP_FALLBACK_INITIALIZATION:
            return NOP_FALLBACK_FACTORY;
        case FAILED_INITIALIZATION:
            throw new IllegalStateException(UNSUCCESSFUL_INIT_MSG);
        case ONGOING_INITIALIZATION:
            // support re-entrant behavior.
            // See also http://jira.qos.ch/browse/SLF4J-97
            return SUBST_FACTORY;
        }
        throw new IllegalStateException("Unreachable code");
    }
484807
public final Logger getLogger()
    {
        if (logger == null)
        {
            logger = LoggerFactory.getLogger(clazz);
        }
        if (logger instanceof LocationAwareLogger)
        {
            return new LocationAwareWrapper(FQCN, (LocationAwareLogger) logger);
        }
        return this.logger;
    }
737895
public static void logMethod(@Nullable final Object... args) {
        if (shouldLog(DEBUG)) {
            Log.println(DEBUG, TAG, getMethodLog(args));
        }
    }
1199301
@Override
    public void logp(Level level, String sourceClass, String sourceMethod, String msg) {
        if (isLoggable(level)) {
            LogRecord logRecord = createLogRecord(level, msg, null, sourceClass, sourceMethod, null, null);
            log(logRecord);
        }
    }
191707
private static void bindLogger(InjectorImpl injector) {
    Key<Logger> key = Key.get(Logger.class);
    LoggerFactory loggerFactory = new LoggerFactory();
    injector.state.putBinding(
        key,
        new ProviderInstanceBindingImpl<Logger>(
            injector,
            key,
            SourceProvider.UNKNOWN_SOURCE,
            loggerFactory,
            Scoping.UNSCOPED,
            loggerFactory,
            ImmutableSet.<InjectionPoint>of()));

    try {
      Key<org.slf4j.Logger> slf4jKey = Key.get(org.slf4j.Logger.class);
      SLF4JLoggerFactory slf4jLoggerFactory = new SLF4JLoggerFactory(injector);
      injector.state.putBinding(slf4jKey,
          new ProviderInstanceBindingImpl<org.slf4j.Logger>(injector, slf4jKey,
              SourceProvider.UNKNOWN_SOURCE, slf4jLoggerFactory, Scoping.UNSCOPED,
              slf4jLoggerFactory, ImmutableSet.<InjectionPoint>of()));
    } catch (Throwable e) {}
  }
125258
@Override
    public void debug(String msg) {
        log.logIfEnabled(FQCN, Level.DEBUG, null, msg, (Object) null);
    }
800910
public java.util.logging.Logger getParentLogger() throws java.sql.SQLFeatureNotSupportedException {
        throw new java.sql.SQLFeatureNotSupportedException();
    }
508936
@Override
    protected void doLogSql() {
        //here we only print prepared sql statement.
        LOG.info("Prepared SQL：" + getSqlDriver().preparedBatchInsertionSql(this).fst);
    }