Make sure LoggerFinder has been lazily activated.
authorMathieu Baudier <mbaudier@argeo.org>
Sat, 28 May 2022 09:30:19 +0000 (11:30 +0200)
committerMathieu Baudier <mbaudier@argeo.org>
Sat, 28 May 2022 09:30:19 +0000 (11:30 +0200)
org.argeo.init/src/org/argeo/init/osgi/OsgiRuntimeContext.java

index 373e3d6719115030884a2ed770b7dbf6667724d9..9bb59ef1dc5c87744291fe3213f4c181ced12b51 100644 (file)
@@ -1,5 +1,6 @@
 package org.argeo.init.osgi;
 
+import java.lang.System.LoggerFinder;
 import java.util.Collections;
 import java.util.Hashtable;
 import java.util.Map;
@@ -55,6 +56,9 @@ public class OsgiRuntimeContext implements RuntimeContext {
        }
 
        public void start(BundleContext bundleContext) {
+               // Make sure LoggerFinder has been searched for, since it is lazily loaded
+               LoggerFinder.getLoggerFinder();
+
                // logging
                loggingConfigurationSr = bundleContext.registerService(Consumer.class,
                                ThinLoggerFinder.getConfigurationConsumer(),
@@ -113,4 +117,8 @@ public class OsgiRuntimeContext implements RuntimeContext {
 
        }
 
+       public Framework getFramework() {
+               return framework;
+       }
+
 }