@Test public void testLogWithResourceBundle() { SLF4JBridgeHandler.install(); String resourceBundleName = "org.slf4j.bridge.testLogStrings"; ResourceBundle bundle = ResourceBundle.getBundle(resourceBundleName); String resourceKey = "resource_key"; String expectedMsg = bundle.getString(resourceKey); String msg = resourceKey; java.util.logging.Logger julResourceBundleLogger = java.util.logging.Logger.getLogger("yay", resourceBundleName); julResourceBundleLogger.info(msg); assertEquals(1, listAppender.list.size()); LoggingEvent le = (LoggingEvent) listAppender.list.get(0); assertEquals(LOGGER_NAME, le.getLoggerName()); assertEquals(expectedMsg, le.getMessage()); }
public static void install() { LogManager.getLogManager().getLogger("").addHandler(new SLF4JBridgeHandler()); }
SLF4JBridgeHandler extends Handler { public static void install() { LogManager.getLogManager().getLogger("").addHandler(new SLF4JBridgeHandler()); } }
SLF4JBridgeHandler extends Handler { public static void install() { LogManager.getLogManager().getLogger("").addHandler(new SLF4JBridgeHandler()); } SLF4JBridgeHandler(); }
SLF4JBridgeHandler extends Handler { public static void install() { LogManager.getLogManager().getLogger("").addHandler(new SLF4JBridgeHandler()); } SLF4JBridgeHandler(); static void install(); static void uninstall(); static boolean isInstalled(); static void removeHandlersForRootLogger(); void close(); void flush(); void publish(LogRecord record); }
SLF4JBridgeHandler extends Handler { public static void install() { LogManager.getLogManager().getLogger("").addHandler(new SLF4JBridgeHandler()); } SLF4JBridgeHandler(); static void install(); static void uninstall(); static boolean isInstalled(); static void removeHandlersForRootLogger(); void close(); void flush(); void publish(LogRecord record);  }