From 0e218315adcf6eed94b18b550c90b5af5845aa07 Mon Sep 17 00:00:00 2001 From: Decebal Suiu Date: Mon, 22 Aug 2016 19:19:47 +0300 Subject: [PATCH] Rename logExtensions() to debugExtensions() --- .../fortsoft/pf4j/AbstractExtensionFinder.java | 16 +++++++++------- .../ro/fortsoft/pf4j/LegacyExtensionFinder.java | 4 ++-- .../pf4j/ServiceProviderExtensionFinder.java | 4 ++-- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/pf4j/src/main/java/ro/fortsoft/pf4j/AbstractExtensionFinder.java b/pf4j/src/main/java/ro/fortsoft/pf4j/AbstractExtensionFinder.java index cdfeb38..ede596a 100644 --- a/pf4j/src/main/java/ro/fortsoft/pf4j/AbstractExtensionFinder.java +++ b/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 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 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); + } } } } diff --git a/pf4j/src/main/java/ro/fortsoft/pf4j/LegacyExtensionFinder.java b/pf4j/src/main/java/ro/fortsoft/pf4j/LegacyExtensionFinder.java index dc47d0e..ff5379c 100644 --- a/pf4j/src/main/java/ro/fortsoft/pf4j/LegacyExtensionFinder.java +++ b/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) { diff --git a/pf4j/src/main/java/ro/fortsoft/pf4j/ServiceProviderExtensionFinder.java b/pf4j/src/main/java/ro/fortsoft/pf4j/ServiceProviderExtensionFinder.java index 1794f69..fae6b08 100644 --- a/pf4j/src/main/java/ro/fortsoft/pf4j/ServiceProviderExtensionFinder.java +++ b/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) { -- 2.39.5