获取单例日志工厂类，如果不存在创建之

@return 当前使用的日志工厂
779999
public static LogFactory get() {
		if (null == currentLogFactory) {
			synchronized (lock) {
				if (null == currentLogFactory) {
					currentLogFactory = LogFactory.create();
				}
			}
		}
		return currentLogFactory;
	}
199471
private StringBuilder getLog(StringBuilder stringBuilder) {
		Process p = null;
		BufferedReader reader = null;
		String line = null;  

		try {
			// read output from logcat
			p = Runtime.getRuntime().exec("logcat -d");
			reader = new BufferedReader(  
					new InputStreamReader(p.getInputStream())); 

			stringBuilder.setLength(0);
			while ((line = reader.readLine()) != null) {  
				stringBuilder.append(line); 
			}
			reader.close();

			// read error from logcat
			StringBuilder errorLog = new StringBuilder();
			reader = new BufferedReader(new InputStreamReader(
					p.getErrorStream()));
			errorLog.append("logcat returns error: ");
			while ((line = reader.readLine()) != null) {
				errorLog.append(line);
			}
			reader.close();

			// Exception would be thrown if we get exitValue without waiting for the process
			// to finish
			p.waitFor();

			// if exit value of logcat is non-zero, it means error
			if (p.exitValue() != 0) {
				destroy(p, reader);

				throw new Exception(errorLog.toString());
			}

		} catch (IOException e) {
			e.printStackTrace();
		} catch (InterruptedException e) {
			e.printStackTrace();
		} catch (Exception e) {
			e.printStackTrace();
		}
		destroy(p, reader);
		return stringBuilder;
	}
1101908
public List<String> getLoggerNames() {
      return Collections.list(java.util.logging.LogManager.getLogManager().getLoggerNames());
   }
1310602
public Date getExpirationDateTime() {
        if (getExpirationDate() == null) {
            return null;
        }

        Calendar cal = Calendar.getInstance();
        cal.setTime(getExpirationDate());
        cal.set(Calendar.HOUR, getExpirationHour());
        cal.set(Calendar.MINUTE, getExpirationMinute());
        cal.set(Calendar.SECOND, 0);
        cal.set(Calendar.MILLISECOND, 0);
        cal.set(Calendar.AM_PM, getExpirationAmPm());
        return cal.getTime();
    }
971481
protected LogFileHeader logFileHeader()
    {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "logFileHeader", this);
        if (tc.isEntryEnabled())
            Tr.exit(tc, "logFileHeader", _logFileHeader);
        return _logFileHeader;
    }
229229
protected static function getLogger()
    {
        static $day;

        if (static::$logger && $day == date('Y-m-d')) {
            return static::$logger;
        }

        $day = date('Y-m-d');

        $config = static::getConfig();
        $logger = new Logger($config['channel']);

        // 单元测试时不执行
        if (defined('PHPUNIT_RUNNING')) {
            $logger->pushHandler(new NullHandler());
        } else {
            // Syslog Log Handler
            if (isset($config['syslog']) && isset($config['syslog']['host'], $config['syslog']['port'])) {
                $handler = new SyslogUdpHandler($config['syslog']['host'], $config['syslog']['port'], LOG_USER, $config['level']);
                $handler->setFormatter(new LineFormatter(static::getFormat()));
                $logger->pushHandler($handler);
            }

            // File Log Handler
            if (isset($config['file'])) {
                if (!isset($config['file']['dir'])) {
                    throw new ConfigException('No log config!');
                }
                $logDir = $config['file']['dir'];
                $logFile = $logDir . '/' . $day . '.log';

                $handler = new StreamHandler($logFile, $config['level'], true, 0777);
                $handler->setFormatter(new LineFormatter(static::getFormat() . "\n"));
                $logger->pushHandler($handler);
            }
        }

        return static::$logger = $logger;
    }
581246
public Observable<String> getLogs() {
        return aFile != null ? aFile.getLogs() : Observable.just(null);
    }
1372465
public PlainChangesLog getChanges()
   {

      Collections.sort(changesLog.getAllStates(), new PathSorter());

      if (LOG.isDebugEnabled())
      {
         StringBuilder str = new StringBuilder();
         for (int i = 0; i < changesLog.getAllStates().size(); i++)
         {
            str.append(" ").append(ItemState.nameFromValue(changesLog.getAllStates().get(i).getState())).append("\t\t");
            str.append(changesLog.getAllStates().get(i).getData().getIdentifier()).append("\t").append("isPersisted=");
            str.append(changesLog.getAllStates().get(i).isPersisted()).append("\t").append("isEventFire=");
            str.append(changesLog.getAllStates().get(i).isEventFire()).append("\t").append("isInternallyCreated=");
            str.append(changesLog.getAllStates().get(i).isInternallyCreated()).append("\t");
            str.append(changesLog.getAllStates().get(i).getData().getQPath().getAsString()).append("\n");
         }
         LOG.debug(str);
      }
      if (isNeedReloadAncestorToSave)
      {
         PlainChangesLogImpl newChangesLog = new PlainChangesLogImpl();
         for (ItemState itemState : changesLog.getAllStates())
         {
            newChangesLog.add(new ItemState(itemState.getData(), itemState.getState(), itemState.isEventFire(),
               ancestorToSave, itemState.isInternallyCreated(), itemState.isPersisted(), itemState.getOldPath()));
         }
         changesLog.clear();
         changesLog.addAll(newChangesLog.getAllStates());
         isNeedReloadAncestorToSave = false;
      }
      return changesLog;
   }
266528
protected final Date getExpirationDate() {
        if (sessionTracker != null) {
            Session currentSession = sessionTracker.getOpenSession();
            return (currentSession != null) ? currentSession.getExpirationDate() : null;
        }
        return null;
    }
811094
@SuppressWarnings("rawtypes")
	public static Enumeration getCurrentLoggers() {
		ArrayList<Logger> copy;
		synchronized (mutex) {
			copy = new ArrayList<Logger>(loggers.values());
		}
		copy.remove(root);
		return Collections.enumeration(copy);
	}
92027
@Override
    public Observable<String> getLogs() {
        return state.get() > GlobalState.INITIALISING ? logMgr.getLogs() : Observable.fromCallable(() -> null);
    }
141362
public Log getLog(String name) {
		Log log = logCache.get(name);
		if (null == log) {
			log = createLog(name);
			logCache.put(name, log);
		}
		return log;
	}
1320450
@Nonnull
  @Nonempty
  @OverrideOnDemand
  protected String getLogMessage (@Nullable final Throwable t)
  {
    if (t == null)
      return "An error occurred";
    return "An exception was thrown";
  }
999497
public java.util.List<LogGroup> getLogGroups() {
        if (logGroups == null) {
            logGroups = new com.amazonaws.internal.SdkInternalList<LogGroup>();
        }
        return logGroups;
    }
251807
public Logger get_logger() {
	if (logger == null) {
	    logger = Logger.getLogger(get_name().toLowerCase());
	    logger.setAdditivity(false);
	    logger.setLevel(Level.WARN);
	    last_level = Level.WARN;
	}
	return logger;
    }
952002
public T elementLog()
    {
        T c = createLike();
        ops.elementLog(mat,c.mat);
        return c;
    }
709217
public java.util.List<String> getExportableLogTypes() {
        if (exportableLogTypes == null) {
            exportableLogTypes = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return exportableLogTypes;
    }