X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.init%2Fsrc%2Forg%2Fargeo%2Finit%2Flogging%2FThinLoggerFinder.java;h=e60d22fba1061238e20da6b0071afdfdcf03ca7a;hb=3b45f571938e0eb6803084aac3f2bd298e6026ba;hp=f443b2e669d28aa9599716e126adb24397db6f66;hpb=fba42be03bc7ec07d464f8942f7dfa2e5f0d6f17;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.init/src/org/argeo/init/logging/ThinLoggerFinder.java b/org.argeo.init/src/org/argeo/init/logging/ThinLoggerFinder.java index f443b2e66..e60d22fba 100644 --- a/org.argeo.init/src/org/argeo/init/logging/ThinLoggerFinder.java +++ b/org.argeo.init/src/org/argeo/init/logging/ThinLoggerFinder.java @@ -21,17 +21,24 @@ public class ThinLoggerFinder extends LoggerFinder { public ThinLoggerFinder() { if (logging != null) throw new IllegalStateException("Only one logging can be initialised."); - init(); +// init(); } @Override public Logger getLogger(String name, Module module) { + lazyInit(); return logging.getLogger(name, module); } private static void init() { logging = new ThinLogging(); + reloadConfiguration(); + } + /** Reload configuration form system properties */ + public static void reloadConfiguration() { + if (logging == null) + return; Map configuration = new HashMap<>(); for (Object key : System.getProperties().keySet()) { Objects.requireNonNull(key);