获取当前进程日志等级

@return
769488
public String getLevel() {
        try {
            LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory();
            return loggerContext.getLogger("root").getLevel().toString();
        } catch (Exception e) {
            e.printStackTrace();
            return "";
        }
    }
908794
protected File createLogDir() {
        File logDir = Optional.ofNullable(logDirPath)
                                    .map(Paths::get)
                                    .map(Path::toFile)
                                    .orElse(new File(System.getProperty("java.io.tmpdir")));

        if (!logDir.exists()) {
            if (!logDir.mkdirs()) {
                log.warn("Unable to create log directory: " + logDir.getAbsolutePath());
                logDir = new File(System.getProperty("java.io.tmpdir"));
                log.info("Using default log directory: " + logDir.getAbsolutePath());
            }
        }

        File logs = new File(logDir, "zookeeper" + System.currentTimeMillis()).getAbsoluteFile();

        if (autoDeleteLogs) {
            logs.deleteOnExit();
        }

        return logs;
    }
393762
public LogEvent[] getLogEvents() {
        if (mLogEvents == null) {
            return new LogEvent[0];
        }
        else {
            LogEvent[] events = new LogEvent[mLogEvents.size()];
            return (LogEvent[])mLogEvents.toArray(events);
        }
    }
1160613
private File getLogsDirectory() {
        if (logsDirectory != null) {
            return logsDirectory;
        }
        logsDirectory = new File(SeLionGridConstants.LOGS_DIR);

        if (!logsDirectory.exists()) {
            logsDirectory.mkdirs();
        }

        return logsDirectory;
    }
944463
public List<LogMessage> getLogs() {
        final ArrayList<LogMessage> messages = new ArrayList<LogMessage>();
        for (final String logName : logs.keySet()) {
            messages.addAll(logs.get(logName).getLogMessages());
        }
        Collections.sort(messages, new LogMessageComparator());
        return messages;
    }
890521
public long getLastLoggedZxid() {
        File[] files = getLogFiles(logDir.listFiles(), 0);
        long maxLog=files.length>0?
                Util.getZxidFromName(files[files.length-1].getName(),"log"):-1;

        // if a log file is more recent we must scan it to find
        // the highest zxid
        long zxid = maxLog;
        try {
            FileTxnLog txn = new FileTxnLog(logDir);
            TxnIterator itr = txn.read(maxLog);
            while (true) {
                if(!itr.next())
                    break;
                TxnHeader hdr = itr.getHeader();
                zxid = hdr.getZxid();
            }
        } catch (IOException e) {
            LOG.warn("Unexpected exception", e);
        }
        return zxid;
    }
1272875
public static Timestamp now() {
    java.sql.Timestamp date = new java.sql.Timestamp(System.currentTimeMillis());
    return of(date);
  }
680538
public OMVRBTreeEntry<K, V> getPreviousInMemory() {
    OMVRBTreeEntry<K, V> t = this;
    OMVRBTreeEntry<K, V> p = null;

    if (t.getLeftInMemory() != null) {
      p = t.getLeftInMemory();
      while (p.getRightInMemory() != null)
        p = p.getRightInMemory();
    } else {
      p = t.getParentInMemory();
      while (p != null && t == p.getLeftInMemory()) {
        t = p;
        p = p.getParentInMemory();
      }
    }

    return p;
  }
571430
function logtime() {
  var d = new Date()
    , space = ' '
    , delimiter = ':'
    , str = d.toString()
    , month = str.split(' ')[1];
  return d.getDate()
    + space + month + space
    + d.getHours() + delimiter
    + pad(d.getMinutes()) + delimiter
    + pad(d.getSeconds())
    + '.'
    + pad(d.getMilliseconds(), 3);
}
835333
protected long getLogSpaceReserved() {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this, cclass
                        , "getLogSpaceReserved"
                          + ")");

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this, cclass
                       , "getLogSpaceReserved"
                       , "returns logSpaceReserved=" + logSpaceReserved + "(long)"
                            );
        return logSpaceReserved;
    }
969497
public BuildLogger getLogger() {
    @SuppressWarnings("unchecked") final List<? extends BuildListener> listeners = getProject().getBuildListeners();
    assert listeners.size() > 0;
    return (BuildLogger)listeners.get(0);
  }
952002
public T elementLog()
    {
        T c = createLike();
        ops.elementLog(mat,c.mat);
        return c;
    }
637806
public Log getLog(Class<?> clazz) {
		Log log = logCache.get(clazz);
		if (null == log) {
			log = createLog(clazz);
			logCache.put(clazz, log);
		}
		return log;
	}
1018307
public double logLikelihood() {
    double loglik = 0;
    for (int i = 0; i < scores.length; i++) {
      loglik += Math.log(classes[i] == 0 ? 1 - scores[i] : scores[i]);
    }
    return loglik;
  }
669198
public synchronized Logger getLogger() {
    if (m_Logger == null) {
      m_Logger = Logger.getLogger(getClass().getName());
      m_Logger.setLevel(LoggingHelper.getLevel(getClass()));
    }
    return m_Logger;
  }
1199841
private Logger log()
    {

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

    }
184090
public boolean isRunning() {

        if (m_lastLogErrorTime <= 0) {
            m_lastLogErrorTime = System.currentTimeMillis();
            m_lastLogWarnTime = m_lastLogErrorTime;
        } else {
            long currentTime = System.currentTimeMillis();
            if ((currentTime - m_lastLogWarnTime) > 30000) {
                // write warning to log after 30 seconds
                if (LOG.isWarnEnabled()) {
                    LOG.warn(
                        Messages.get().getBundle().key(
                            Messages.LOG_WAITING_ABANDONED_THREADS_2,
                            new Integer(m_abandonedCounter),
                            new Integer((m_startedCounter - m_returnedCounter))));
                }
                m_lastLogWarnTime = currentTime;
            }
            if ((currentTime - m_lastLogErrorTime) > 600000) {
                // write error to log after 10 minutes
                LOG.error(
                    Messages.get().getBundle().key(
                        Messages.LOG_WAITING_ABANDONED_THREADS_2,
                        new Integer(m_abandonedCounter),
                        new Integer((m_startedCounter - m_returnedCounter))));
                m_lastLogErrorTime = currentTime;
            }
        }

        boolean result = (m_returnedCounter + m_abandonedCounter) < m_startedCounter;
        if (result && LOG.isInfoEnabled()) {
            // write a note to the log that all threads have finished
            LOG.info(Messages.get().getBundle().key(Messages.LOG_THREADS_FINISHED_0));
        }
        return result;
    }