Bind to static Jsch logger, and return the logger instance
@return the shared instance
@param logger logger
@param loggingLevel level
963978
public static ThreadBoundJschLogger getInstance(final PluginLogger logger, final int loggingLevel) {
        getInstance();
        instance.setThreadLogger(logger, loggingLevel);
        return instance;
    }
973154
public static JRLogger getLogger(final Class<?> clazz) {

        JRLogger logger = loggerMap.get(clazz.getName());
        if (logger == null) {
            JRLogger newInstance = null;

            // Get the logger instance according to slf4j configuration
            final org.slf4j.Logger innerLogger = LoggerFactory.getLogger(clazz);

            if ("ch.qos.logback.classic.Logger".equals(innerLogger.getClass().getName())) {
                newInstance = new LogbackAdapter((ch.qos.logback.classic.Logger) innerLogger);
            } else {

                newInstance = new Slf4jAdapter(innerLogger);
            }

            final JRLogger oldInstance = loggerMap.putIfAbsent(clazz.getName(), newInstance);
            logger = oldInstance == null ? newInstance : oldInstance;
        }
        return logger;
    }
284841
public static LogInfo setLogLevel(String logName, String level) throws IOException {
    LogInfo result = new LogInfo();
    if (StringUtils.isNotBlank(logName)) {
      result.setLogName(logName);
      Log log = LogFactory.getLog(logName);
      Logger logger = LoggerFactory.getLogger(logName);
      if (log instanceof Log4JLogger) {
        process(((Log4JLogger) log).getLogger(), level, result);
      } else if (log instanceof Jdk14Logger) {
        process(((Jdk14Logger) log).getLogger(), level, result);
      } else if (logger instanceof Log4jLoggerAdapter) {
        try {
          Field field = Log4jLoggerAdapter.class.getDeclaredField("logger");
          field.setAccessible(true);
          org.apache.log4j.Logger log4jLogger = (org.apache.log4j.Logger) field.get(logger);
          process(log4jLogger, level, result);
        } catch (NoSuchFieldException | IllegalAccessException e) {
          result.setMessage(e.getMessage());
        }
      } else {
        result.setMessage("Sorry, " + log.getClass() + " not supported.");
      }
    } else {
      result.setMessage("Please specify a correct logName.");
    }
    return result;
  }
17138
public void setLoggingLevel(final int loggingLevel, final Class<?>... deviceClassNames) {

        if (rootLoggingLevel < loggingLevel) {
            setRootLoggingLevel(loggingLevel);
        }
        System.out.println("set logging to " + LoggingLevel.getLevelFromInt(loggingLevel));
        final Logger tangoLogger = LoggerFactory.getLogger("org.tango.server");
        if (tangoLogger instanceof ch.qos.logback.classic.Logger) {
            final ch.qos.logback.classic.Logger logbackLogger = (ch.qos.logback.classic.Logger) tangoLogger;
            logbackLogger.setLevel(LoggingLevel.getLevelFromInt(loggingLevel));
        }
        final Logger blackboxLogger = LoggerFactory.getLogger(Constants.CLIENT_REQUESTS_LOGGER);
        if (blackboxLogger instanceof ch.qos.logback.classic.Logger) {
            final ch.qos.logback.classic.Logger logbackLogger = (ch.qos.logback.classic.Logger) blackboxLogger;
            logbackLogger.setLevel(LoggingLevel.getLevelFromInt(loggingLevel));
        }
        for (int i = 0; i < deviceClassNames.length; i++) {
            final Logger deviceLogger = LoggerFactory.getLogger(deviceClassNames[i]);
            if (deviceLogger instanceof ch.qos.logback.classic.Logger) {
                final ch.qos.logback.classic.Logger logbackLogger = (ch.qos.logback.classic.Logger) deviceLogger;
                logbackLogger.setLevel(LoggingLevel.getLevelFromInt(loggingLevel));
            }
        }

    }
254310
public List<LogEvent> getLogsFrom(LogLevel level)
    {
        List<LogEvent> levelLogs = new LinkedList<LogEvent>();

        for (LogEvent log : this) {
            if (log.getLevel().compareTo(level) <= 0) {
                levelLogs.add(log);
            }
        }

        return levelLogs;
    }
982187
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings("LG_LOST_LOGGER_DUE_TO_WEAK_REFERENCE")
    @RequirePOST
    public HttpResponse doConfigLogger(@QueryParameter String name, @QueryParameter String level) {
        Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER);
        Level lv;
        if(level.equals("inherit"))
            lv = null;
        else
            lv = Level.parse(level.toUpperCase(Locale.ENGLISH));
        Logger.getLogger(name).setLevel(lv);
        return new HttpRedirect("levels");
    }
344169
def loggerLevel(self, logger):
        
        try:
            return self._loggerLevels[logger]
        except KeyError:
            items = sorted(self._loggerLevels.items())
            for key, lvl in items:
                if logger.startswith(key):
                    return lvl
            return logging.NOTSET
593736
private org.apache.log4j.Logger getLogger()
	{
        /*
        Logger interface extends Serializable, thus Log field is
        declared 'transient' and we have to null-check
		*/
		if (logger == null)
		{
			logger = org.apache.log4j.Logger.getLogger(name);
		}
		return logger;
	}
56785
@SuppressWarnings("unchecked")
	public static <T, L extends LoggerInformer> L getLogger(Class<T> clazz) {
		return (L)SLF4JLoggerFactory.getLogger(clazz);
	}
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;
    }
1180987
public static String logLevelToString(final int level) {
        String logLevel;
        switch (level) {
            case Project.MSG_DEBUG:
                logLevel = "DEBUG";
                break;
            case Project.MSG_VERBOSE:
                logLevel = "VERBOSE";
                break;
            case Project.MSG_INFO:
                logLevel = "INFO";
                break;
            case Project.MSG_WARN:
                logLevel = "WARN";
                break;
            case Project.MSG_ERR:
                logLevel = "ERROR";
                break;
            default:
                logLevel = "UNKNOWN";
                break;
        }
        return logLevel;

    }
1310355
@VisibleForTesting
  static Level getLogLevel(Throwable t) {
    if (t instanceof IOException && t.getMessage() != null) {
      for (String msg : QUIET_ERRORS) {
        if (t.getMessage().equals(msg)) {
          return Level.FINE;
        }
      }
    }
    return Level.INFO;
  }
1343289
@Deprecated
    public int getLevel() {
        Level level = loggerProxy.getLevel();
        return level != null ? level.intValue() : 0;
    }
281259
public ProxyDataSourceBuilder logSlowQueryByJUL(long thresholdTime, TimeUnit timeUnit, Level logLevel) {
        return logSlowQueryByJUL(thresholdTime, timeUnit, logLevel, null);
    }
36664
@Override
  public void logMessage(LogLevel logLevel, String message, Class clazz, String methodName) {
    Logger logger = Logger.getLogger(clazz.getName());
    logger.logp(convertToJDK14Level(logLevel), clazz.getName(), methodName, message);
  }
1078725
public JULQueryCountLoggingServletFilter buildJULFilter(Level logLevel) {
        if (logLevel != null) {
            this.julLogLevel = logLevel;
        }

        JULQueryCountLoggingServletFilter filter = new JULQueryCountLoggingServletFilter();
        if (this.julLogLevel != null) {
            filter.setLogLevel(this.julLogLevel);
        }
        filter.setWriteAsJson(this.writeAsJson);
        return filter;
    }
515976
public static Logger getInstance(Class loggerClient) {
        return new Logger(org.apache.commons.logging.LogFactory.getLog(loggerClient.getName()));
    }