1 package com.github.valfirst.slf4jtest;
2
3 import java.util.logging.Level;
4 import java.util.logging.LogManager;
5 import org.slf4j.bridge.SLF4JBridgeHandler;
6
7
8
9
10
11
12 public class JulConfig {
13
14
15
16
17
18 public static void setup() {
19 if (!SLF4JBridgeHandler.isInstalled()) {
20 synchronized (JulConfig.class) {
21 if (!SLF4JBridgeHandler.isInstalled()) {
22 SLF4JBridgeHandler.removeHandlersForRootLogger();
23 SLF4JBridgeHandler.install();
24 LogManager.getLogManager().getLogger("").setLevel(Level.ALL);
25 }
26 }
27 }
28 }
29
30 private JulConfig() {}
31 }