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; entries = null;
} }
protected void logExtensions(Set<String> extensions) { protected void debugExtensions(Set<String> extensions) {
if (extensions.isEmpty()) { if (log.isDebugEnabled()) {
log.debug("No extensions found"); if (extensions.isEmpty()) {
} else { log.debug("No extensions found");
log.debug("Found possible {} extensions:", extensions.size()); } else {
for (String extension : extensions) { log.debug("Found possible {} extensions:", extensions.size());
log.debug(" " + extension); 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); LegacyExtensionStorage.read(reader, bucket);
} }
logExtensions(bucket); debugExtensions(bucket);
result.put(null, bucket); result.put(null, bucket);
} catch (IOException e) { } catch (IOException e) {
@ -90,7 +90,7 @@ public class LegacyExtensionFinder extends AbstractExtensionFinder {
log.debug("Cannot find '{}'", getExtensionsResource()); log.debug("Cannot find '{}'", getExtensionsResource());
} }
logExtensions(bucket); debugExtensions(bucket);
result.put(pluginId, bucket); result.put(pluginId, bucket);
} catch (IOException e) { } 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)); bucket.addAll(readExtensions(extensionPath));
} }
logExtensions(bucket); debugExtensions(bucket);
result.put(null, bucket); result.put(null, bucket);
} catch (IOException | URISyntaxException e) { } catch (IOException | URISyntaxException e) {
@ -111,7 +111,7 @@ public class ServiceProviderExtensionFinder extends AbstractExtensionFinder {
log.debug("Cannot find '{}'", getExtensionsResource()); log.debug("Cannot find '{}'", getExtensionsResource());
} }
logExtensions(bucket); debugExtensions(bucket);
result.put(pluginId, bucket); result.put(pluginId, bucket);
} catch (IOException | URISyntaxException e) { } catch (IOException | URISyntaxException e) {

Loading…
Cancel
Save