]> source.dussan.org Git - pf4j.git/commitdiff
Rename logExtensions() to debugExtensions() 108/head
authorDecebal Suiu <decebal.suiu@gmail.com>
Mon, 22 Aug 2016 16:19:47 +0000 (19:19 +0300)
committerDecebal Suiu <decebal.suiu@gmail.com>
Mon, 22 Aug 2016 16:19:47 +0000 (19:19 +0300)
pf4j/src/main/java/ro/fortsoft/pf4j/AbstractExtensionFinder.java
pf4j/src/main/java/ro/fortsoft/pf4j/LegacyExtensionFinder.java
pf4j/src/main/java/ro/fortsoft/pf4j/ServiceProviderExtensionFinder.java

index cdfeb38d17ca029a0c4c67a805b3e5830ad2ab69..ede596a8b6b683eda1820b45f905fee58f42de3c 100644 (file)
@@ -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);
+                }
             }
         }
     }
index dc47d0edd3f5cf92895eff2732f6f321fc886ab8..ff5379c85ea0a425f42408d64a81dce18cd524f4 100644 (file)
@@ -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) {
index 1794f699b1ff6c4fb8ec1a42c717031a64e852cb..fae6b08ac6ba300334287826bd947c8a32dd6f11 100644 (file)
@@ -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) {