public static UjoLogger getLogger(Class<?> name) { return slf4jSupport ? newUjoLoggerBridge2Slf4j(name) : new UjoLoggerFactory(name) ; }
private static UjoLogger newUjoLoggerBridge2Slf4j(@Nonnull Class name) { UjoLogger result; try { result = new UjoLoggerBridge2Slf4j(name); if (showLog) { showLog = false; result.log(Level.FINEST, "Ujorm logging is switched to the SLF4J."); } } catch (RuntimeException | NoClassDefFoundError | OutOfMemoryError e) { slf4jSupport = false; result = new UjoLoggerFactory(name); result.log(Level.INFO, "Ujorm logging is switched to the JUL."); } return result; }
private static UjoLogger newUjoLoggerBridge2Slf4j(Class name) { UjoLogger result; try { result = new UjoLoggerBridge2Slf4j(name); if (showLog) { showLog = false; result.log(Level.INFO, "Ujorm logging is switched to the SLF4J."); } } catch (Throwable e) { slf4jSupport = false; result = new UjoLoggerFactory(name); result.log(Level.INFO, "Ujorm logging is switched to the JUL."); } return result; }
public static UjoLogger getLogger(@Nonnull Class<?> name) { return slf4jSupport ? newUjoLoggerBridge2Slf4j(name) : new UjoLoggerFactory(name) ; }