Browse Source

Rename logExtensions() to debugExtensions()

pull/108/head
Decebal Suiu 8 years ago
parent
commit
0e218315ad
  1. 16
      pf4j/src/main/java/ro/fortsoft/pf4j/AbstractExtensionFinder.java
  2. 4
      pf4j/src/main/java/ro/fortsoft/pf4j/LegacyExtensionFinder.java
  3. 4
      pf4j/src/main/java/ro/fortsoft/pf4j/ServiceProviderExtensionFinder.java

16
pf4j/src/main/java/ro/fortsoft/pf4j/AbstractExtensionFinder.java

@ -186,13 +186,15 @@ public abstract class AbstractExtensionFinder implements ExtensionFinder, Plugin
entries = null;
}
protected void logExtensions(Set<String> extensions) {
if (extensions.isEmpty()) {
log.debug("No extensions found");
} else {
log.debug("Found possible {} extensions:", extensions.size());
for (String extension : extensions) {
log.debug(" " + extension);
protected void debugExtensions(Set<String> extensions) {
if (log.isDebugEnabled()) {
if (extensions.isEmpty()) {
log.debug("No extensions found");
} else {
log.debug("Found possible {} extensions:", extensions.size());
for (String extension : extensions) {
log.debug(" " + extension);
}
}
}
}

4
pf4j/src/main/java/ro/fortsoft/pf4j/LegacyExtensionFinder.java

@ -59,7 +59,7 @@ public class LegacyExtensionFinder extends AbstractExtensionFinder {
LegacyExtensionStorage.read(reader, bucket);
}
logExtensions(bucket);
debugExtensions(bucket);
result.put(null, bucket);
} catch (IOException e) {
@ -90,7 +90,7 @@ public class LegacyExtensionFinder extends AbstractExtensionFinder {
log.debug("Cannot find '{}'", getExtensionsResource());
}
logExtensions(bucket);
debugExtensions(bucket);
result.put(pluginId, bucket);
} catch (IOException e) {

4
pf4j/src/main/java/ro/fortsoft/pf4j/ServiceProviderExtensionFinder.java

@ -74,7 +74,7 @@ public class ServiceProviderExtensionFinder extends AbstractExtensionFinder {
bucket.addAll(readExtensions(extensionPath));
}
logExtensions(bucket);
debugExtensions(bucket);
result.put(null, bucket);
} catch (IOException | URISyntaxException e) {
@ -111,7 +111,7 @@ public class ServiceProviderExtensionFinder extends AbstractExtensionFinder {
log.debug("Cannot find '{}'", getExtensionsResource());
}
logExtensions(bucket);
debugExtensions(bucket);
result.put(pluginId, bucket);
} catch (IOException | URISyntaxException e) {

Loading…
Cancel
Save