X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.init%2Fsrc%2Forg%2Fargeo%2Finit%2Flogging%2FThinLogging.java;h=44baa691993bd3252620a7acad1e978b3512a9e7;hb=01b972e4abce933b3ce06bd18e933b08d3b35464;hp=e7edc19a89e9858b9a7ee0d1ba9eb0e21f97f45c;hpb=b7d8618ce593bbeca7e311d32a4d98988e27f877;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.init/src/org/argeo/init/logging/ThinLogging.java b/org.argeo.init/src/org/argeo/init/logging/ThinLogging.java index e7edc19a8..44baa6919 100644 --- a/org.argeo.init/src/org/argeo/init/logging/ThinLogging.java +++ b/org.argeo.init/src/org/argeo/init/logging/ThinLogging.java @@ -22,8 +22,6 @@ import java.util.concurrent.TimeUnit; /** A thin logging system based on the {@link Logger} framework. */ class ThinLogging { -// private static ThinLogging instance; - private SortedMap loggers = new TreeMap<>(); private NavigableMap levels = new TreeMap<>(); @@ -31,10 +29,6 @@ class ThinLogging { private final LogEntryPublisher publisher; ThinLogging() { -// if (instance != null) -// throw new IllegalStateException("Only one logger finder cann be instantiated"); -// instance = this; - executor = Executors.newCachedThreadPool((r) -> { Thread t = new Thread(r); t.setDaemon(true); @@ -46,6 +40,8 @@ class ThinLogging { publisher.subscribe(subscriber); Runtime.getRuntime().addShutdownHook(new Thread(() -> close(), "Log shutdown")); + + setDefaultLevel(Level.DEBUG); } protected void close() {