private static LogFactory detectLogFactory() {
        LogFactory logFactory;
        try {
            logFactory = new Slf4jLogFactory(true);
            logFactory.getLog(LogFactory.class).debug("Use [{}] Logger As Default.", logFactory.logFramworkName);
        } catch (Throwable e) {
            try {
                logFactory = new Log4jLogFactory();
                logFactory.getLog(LogFactory.class).debug("Use [{}] Logger As Default.", logFactory.logFramworkName);
            } catch (Throwable e2) {
                try {
                    logFactory = new Log4j2LogFactory();
                    logFactory.getLog(LogFactory.class).debug("Use [{}] Logger As Default.", logFactory.logFramworkName);
                } catch (Throwable e3) {
                    try {
                        logFactory = new JdkLogFactory();
                        logFactory.getLog(LogFactory.class).debug("Use [{}] Logger As Default.", logFactory.logFramworkName);
                    } catch (Throwable e5) {
                        logFactory = new ConsoleLogFactory();
                        logFactory.getLog(LogFactory.class).debug("Use [{}] Logger As Default.", logFactory.logFramworkName);
                    }
                }
            }
        }

        return logFactory;
    }
private static LogFactory detectLogFactory ( ) { LogFactory logFactory ; try { logFactory = new Slf4jLogFactory ( true ) ; logFactory . getLog ( LogFactory . class ) . debug ( "Use [{}] Logger As Default." , logFactory . logFramworkName ) ; } catch ( Throwable e ) { try { logFactory = new Log4jLogFactory ( ) ; logFactory . getLog ( LogFactory . class ) . debug ( "Use [{}] Logger As Default." , logFactory . logFramworkName ) ; } catch ( Throwable e2 ) { try { logFactory = new Log4j2LogFactory ( ) ; logFactory . getLog ( LogFactory . class ) . debug ( "Use [{}] Logger As Default." , logFactory . logFramworkName ) ; } catch ( Throwable e3 ) { try { logFactory = new JdkLogFactory ( ) ; logFactory . getLog ( LogFactory . class ) . debug ( "Use [{}] Logger As Default." , logFactory . logFramworkName ) ; } catch ( Throwable e5 ) { logFactory = new ConsoleLogFactory ( ) ; logFactory . getLog ( LogFactory . class ) . debug ( "Use [{}] Logger As Default." , logFactory . logFramworkName ) ; } } } } return logFactory ; }
决定日志实现

@return 日志实现类