private static final Logger LOG = LoggerFactory.getLogger(ConnectionWebService.class);
542802
@POST
    @Path("close")    
    public void close(String id) {
    	Connection connection = ConnectionHolder.get().get(id);
    	try {
			connection.close();
			ConnectionHolder.get().remove(id);
		} catch (SQLException e) {
			// TODO
			throw new RuntimeException(e);
		}		
    }
1177356
public Logger getLogger(String name) {
        Logger slf4jLogger = loggerMap.get(name);
        if (slf4jLogger != null) {
            return slf4jLogger;
        } else {
            org.apache.log4j.Logger log4jLogger;
            if (name.equalsIgnoreCase(Logger.ROOT_LOGGER_NAME))
                log4jLogger = LogManager.getRootLogger();
            else
                log4jLogger = LogManager.getLogger(name);

            Logger newInstance = new Log4jLoggerAdapter(log4jLogger);
            Logger oldInstance = loggerMap.putIfAbsent(name, newInstance);
            return oldInstance == null ? newInstance : oldInstance;
        }
    }
355309
@FFDCIgnore(Exception.class)
    private void logProviderInfo(String providerName, ClassLoader loader) {
        try {
            if (PROVIDER_ECLIPSELINK.equals(providerName)) {
                // org.eclipse.persistence.Version.getVersion(): 2.6.4.v20160829-44060b6
                Class<?> Version = loadClass(loader, "org.eclipse.persistence.Version");
                String version = (String) Version.getMethod("getVersionString").invoke(Version.newInstance());
                Tr.info(tc, "JPA_THIRD_PARTY_PROV_INFO_CWWJP0053I", "EclipseLink", version);
            } else if (PROVIDER_HIBERNATE.equals(providerName)) {
                // org.hibernate.Version.getVersionString(): 5.2.6.Final
                Class<?> Version = loadClass(loader, "org.hibernate.Version");
                String version = (String) Version.getMethod("getVersionString").invoke(null);
                Tr.info(tc, "JPA_THIRD_PARTY_PROV_INFO_CWWJP0053I", "Hibernate", version);
            } else if (PROVIDER_OPENJPA.equals(providerName)) {
                // OpenJPAVersion.appendOpenJPABanner(sb): OpenJPA #.#.#\n version id: openjpa-#.#.#-r# \n Apache svn revision: #
                StringBuilder version = new StringBuilder();
                Class<?> OpenJPAVersion = loadClass(loader, "org.apache.openjpa.conf.OpenJPAVersion");
                OpenJPAVersion.getMethod("appendOpenJPABanner", StringBuilder.class).invoke(OpenJPAVersion.newInstance(), version);
                Tr.info(tc, "JPA_THIRD_PARTY_PROV_INFO_CWWJP0053I", "OpenJPA", version);
            } else {
                Tr.info(tc, "JPA_THIRD_PARTY_PROV_NAME_CWWJP0052I", providerName);
            }
        } catch (Exception x) {
            Tr.info(tc, "JPA_THIRD_PARTY_PROV_NAME_CWWJP0052I", providerName);
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                Tr.debug(this, tc, "unable to determine provider info", x);
        }
    }
1169239
def logger(self):
        
        if not hasattr(self, '_logger') or not self._logger:
            self._logger = ServiceLogger()
        return self._logger
434619
protected static final Logger initializeLogger()
    {
        //get logger
        Logger logger=Logger.getLogger(FaxClient.class.getName());
        
        //enable all log events (fax4j logger filters out uneeded log events)
        logger.setLevel(Level.ALL);
        logger.setFilter(null);
        
        //enable to pass log events to parent loggers
        logger.setUseParentHandlers(true);

        //create handler
        Formatter formatter=new SimpleFormatter();
        Handler handler=new StreamHandler(System.out,formatter);
        
        //set filtering
        handler.setLevel(logger.getLevel());
        handler.setFilter(logger.getFilter());

        //add handler
        logger.addHandler(handler);

        return logger;
    }
1199841
private Logger log()
    {

        if (log == null)
        {
            log = Logger.getLogger(_PackageInfo.class.getName());
        }
        return log;

    }
1224589
private static LogAdapterFactory getAdapterFactory()
   {
      // double-checked locking
      if (_adapterFactory == null)
      {
         synchronized (Logger.class)
         {
            if (_adapterFactory == null)
            {
               _adapterFactory = createAdapterFactory();
            }
         }
      }
      return _adapterFactory;
   }
820150
private synchronized void ungetLogService() {
        doWarnIfClosed = doDebug();
        if (log != null) {
            bc.ungetService(logSR);
            logSR = null;
            log = null;
        }
    }
176806
protected static I_CmsLogServiceAsync getLoggingService() {

        if (m_loggingService == null) {
            m_loggingService = GWT.create(I_CmsLogService.class);
            String serviceUrl = CmsCoreProvider.get().link("org.opencms.gwt.CmsLogService.gwt");
            ((ServiceDefTarget)m_loggingService).setServiceEntryPoint(serviceUrl);

        }
        return m_loggingService;
    }
1079570
public static Logger getLogger()
   {
       if (m_logger == null)
       {
           m_logger = Logger.getLogger(Constant.ROOT_PACKAGE.substring(0, Constant.ROOT_PACKAGE.length() - 1));
           try {
               LogManager logManager = LogManager.getLogManager();
               logManager.reset();//removeAllGlobalHandlers();
               ConsoleHandler fh = new ConsoleHandler();
               fh.setFormatter(new SimpleFormatter());
               // Send logger output to our FileHandler.
               m_logger.addHandler(fh);
           } catch (java.security.AccessControlException ex)    {
               // Access error if running in an applet.
        	   m_logger = Logger.getAnonymousLogger();
           } finally {
               try {
	               // Request that every detail gets logged.
//                 m_logger.setLevel(Level.OFF);
//                   m_logger.setLevel(Level.ALL);
	               m_logger.setLevel(Level.WARNING);        	   
               } catch (java.security.AccessControlException ex)    {
            	   ex.printStackTrace();	// Never
               }
           }
       }
       return m_logger;
   }
1081165
@NotNull
	public static ILogger getLogger(@Nullable ILogger logger) {
		return logger == null ? new NullLogger() : logger;
	}
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) {}
  }
1106809
public com.google.api.Logging getLogging() {
    return logging_ == null ? com.google.api.Logging.getDefaultInstance() : logging_;
  }
1294574
public static <T> Parameters.Builder<T> logger(Class<?> cls) {
        return Parameters.<T> builder().logger(cls);
    }
1120689
@SuppressWarnings("unchecked")
    private void processJavaLoggerDiscovery(ClassTraceInfo info) {
        List<FieldNode> loggerFields = getFieldsByDesc(LOGGER_TYPE.getDescriptor(), info.classNode.fields);
        if (!loggerFields.isEmpty()) {
            // Remove references to non-static Loggers
            for (int i = loggerFields.size() - 1; i >= 0; i--) {
                FieldNode fn = loggerFields.get(i);
                if ((fn.access & Opcodes.ACC_STATIC) != Opcodes.ACC_STATIC) {
                    loggerFields.remove(i);
                    StringBuilder sb = new StringBuilder();
                    sb.append("WARNING: Non-static java.util.logging.Logger field declared on class ");
                    sb.append(info.classNode.name.replaceAll("/", "\\.")).append(": ");
                    sb.append(fn.name);
                    info.warnings.add(sb.toString());
                }
            }
            if (loggerFields.size() > 1) {
                StringBuilder sb = new StringBuilder();
                sb.append("WARNING: Multiple java.util.logging.Logger fields declared on class ");
                sb.append(info.classNode.name.replaceAll("/", "\\.")).append(": ");
                for (int i = 0; i < loggerFields.size(); i++) {
                    sb.append(loggerFields.get(i).name);
                    if (i + 1 != loggerFields.size()) {
                        sb.append(", ");
                    }
                }
                info.warnings.add(sb.toString());
            }

            // Keep track of the first static Logger
            if (loggerFields.size() > 0) {
                info.loggerFieldNode = loggerFields.get(0);
            }
        }
    }
906051
public static <T> Log get(Class<T> cls) {
        return new Log(Logger.getLogger(cls.getName()));
    }
217821
public Logger getLogger(String loggerName)
    {
        Logger logger;
        //lookup in the cache first
        logger = (Logger) cache.get(loggerName);

        if(logger == null)
        {
            try
            {
                // get the configuration (not from the configurator because this is independent)
                logger = createLoggerInstance(loggerName);
                if(getBootLogger().isDebugEnabled())
                {
                    getBootLogger().debug("Using logger class '"
                            + (getConfiguration() != null ? getConfiguration().getLoggerClass() : null)
                            + "' for " + loggerName);
                }
                // configure the logger
                getBootLogger().debug("Initializing logger instance " + loggerName);
                logger.configure(conf);
            }
            catch(Throwable t)
            {
                // do reassign check and signal logger creation failure
                reassignBootLogger(true);
                logger = getBootLogger();
                getBootLogger().error("[" + this.getClass().getName()
                            + "] Could not initialize logger " + (conf != null ? conf.getLoggerClass() : null), t);
            }
            //cache it so we can get it faster the next time
            cache.put(loggerName, logger);
            // do reassign check
            reassignBootLogger(false);
        }
        return logger;
    }