Browse Source

Add useful log messages

pull/108/head
Decebal Suiu 9 years ago
parent
commit
b40e1638ad
  1. 6
      pf4j/src/main/java/ro/fortsoft/pf4j/AbstractExtensionFinder.java
  2. 2
      pf4j/src/main/java/ro/fortsoft/pf4j/LegacyExtensionFinder.java

6
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;

2
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 {

Loading…
Cancel
Save