X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.init%2Fsrc%2Forg%2Fargeo%2Fapi%2Fa2%2FClasspathSource.java;h=b702d35a0f89495e6b8851618db3300522044231;hb=6bfcb81dd21d8fdd9094610c00f5f8ad9c6a36a7;hp=2f1cf95fad9a6dd66aed2e40b4062f5f02d58ead;hpb=e90495f6155a3996fa8b7009a5f7dc7f33a2ecb8;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.init/src/org/argeo/api/a2/ClasspathSource.java b/org.argeo.init/src/org/argeo/api/a2/ClasspathSource.java index 2f1cf95fa..b702d35a0 100644 --- a/org.argeo.init/src/org/argeo/api/a2/ClasspathSource.java +++ b/org.argeo.init/src/org/argeo/api/a2/ClasspathSource.java @@ -2,12 +2,13 @@ package org.argeo.api.a2; import java.io.File; import java.io.IOException; +import java.lang.System.Logger; +import java.lang.System.Logger.Level; import java.nio.file.Path; import java.nio.file.Paths; import java.util.Arrays; import java.util.List; -import org.argeo.init.osgi.OsgiBootUtils; import org.osgi.framework.Version; /** @@ -15,13 +16,14 @@ import org.osgi.framework.Version; * been started. */ public class ClasspathSource extends AbstractProvisioningSource { - + private final static Logger logger = System.getLogger(ClasspathSource.class.getName()); + public ClasspathSource() { super(true); } void load() throws IOException { - A2Contribution classpathContribution = getOrAddContribution( A2Contribution.CLASSPATH); + A2Contribution classpathContribution = getOrAddContribution(A2Contribution.CLASSPATH); List classpath = Arrays.asList(System.getProperty("java.class.path").split(File.pathSeparator)); parts: for (String part : classpath) { Path file = Paths.get(part); @@ -35,8 +37,7 @@ public class ClasspathSource extends AbstractProvisioningSource { String moduleName = readSymbolicNameFromModule(file); A2Component component = classpathContribution.getOrAddComponent(moduleName); A2Module module = component.getOrAddModule(version, file); - if (OsgiBootUtils.isDebug()) - OsgiBootUtils.debug("Registered " + module); + logger.log(Level.TRACE, () -> "Registered " + module); } }