diff options
author | Decebal Suiu <decebal.suiu@gmail.com> | 2016-07-01 23:21:16 +0300 |
---|---|---|
committer | Decebal Suiu <decebal.suiu@gmail.com> | 2016-07-01 23:21:16 +0300 |
commit | b40e1638adbd54960e83f9624e1684ef94d288b7 (patch) | |
tree | 1b612fe431ba8261a52f1f60327fe24e112a0327 | |
parent | 3c23f02f990a210c1af8c2ed3d0278c43ac67fd8 (diff) | |
download | pf4j-b40e1638adbd54960e83f9624e1684ef94d288b7.tar.gz pf4j-b40e1638adbd54960e83f9624e1684ef94d288b7.zip |
Add useful log messages
-rw-r--r-- | pf4j/src/main/java/ro/fortsoft/pf4j/AbstractExtensionFinder.java | 6 | ||||
-rw-r--r-- | pf4j/src/main/java/ro/fortsoft/pf4j/LegacyExtensionFinder.java | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/pf4j/src/main/java/ro/fortsoft/pf4j/AbstractExtensionFinder.java b/pf4j/src/main/java/ro/fortsoft/pf4j/AbstractExtensionFinder.java index 5791cb3..900ebb9 100644 --- a/pf4j/src/main/java/ro/fortsoft/pf4j/AbstractExtensionFinder.java +++ b/pf4j/src/main/java/ro/fortsoft/pf4j/AbstractExtensionFinder.java @@ -62,6 +62,10 @@ public abstract class AbstractExtensionFinder implements ExtensionFinder, Plugin if (PluginState.STARTED != pluginWrapper.getPluginState()) { continue; } + + log.trace("Checking extensions from plugin '{}'", pluginId); + } else { + log.trace("Checking extensions from classpath"); } ClassLoader classLoader = (pluginId != null) ? pluginManager.getPluginClassLoader(pluginId) : getClass().getClassLoader(); @@ -73,7 +77,7 @@ public abstract class AbstractExtensionFinder implements ExtensionFinder, Plugin { // in this scenario the method 'isAssignableFrom' returns only FALSE // see http://www.coderanch.com/t/557846/java/java/FWIW-FYI-isAssignableFrom-isInstance-differing - log.error("Different class loaders: '{}' and '{}'", classLoader, typeClassLoader); + log.error("Different class loaders: '{}' (E) and '{}' (EP)", classLoader, typeClassLoader); // below line is commented because I wish to see the next log.trace line // continue; diff --git a/pf4j/src/main/java/ro/fortsoft/pf4j/LegacyExtensionFinder.java b/pf4j/src/main/java/ro/fortsoft/pf4j/LegacyExtensionFinder.java index 03a6bab..1e6e5db 100644 --- a/pf4j/src/main/java/ro/fortsoft/pf4j/LegacyExtensionFinder.java +++ b/pf4j/src/main/java/ro/fortsoft/pf4j/LegacyExtensionFinder.java @@ -84,7 +84,7 @@ public class LegacyExtensionFinder extends AbstractExtensionFinder { List<PluginWrapper> plugins = pluginManager.getPlugins(); for (PluginWrapper plugin : plugins) { String pluginId = plugin.getDescriptor().getPluginId(); - log.debug("Reading extensions storage for plugin '{}'", pluginId); + log.debug("Reading extensions storage from plugin '{}'", pluginId); Set<String> bucket = new HashSet<>(); try { |