updated logs
This commit is contained in:
parent
82e8505bdc
commit
94bb1b9315
|
@ -79,7 +79,9 @@ public class CatalogueBindingPlugin extends AbstractPlugin implements Initializa
|
||||||
report.setStatus(Report.Status.OK);
|
report.setStatus(Report.Status.OK);
|
||||||
report.putMessage("Initialized " + DESCRIPTOR.getId() + " in the " + context);
|
report.putMessage("Initialized " + DESCRIPTOR.getId() + " in the " + context);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new InitializationException("Unable to initialize " + DESCRIPTOR.getId(), e);
|
InitializationException exc = new InitializationException("Unable to initialize " + DESCRIPTOR.getId(), e);
|
||||||
|
log.error("initInContext error: {} ", exc);
|
||||||
|
throw exc;
|
||||||
}
|
}
|
||||||
return report;
|
return report;
|
||||||
}
|
}
|
||||||
|
@ -129,6 +131,8 @@ public class CatalogueBindingPlugin extends AbstractPlugin implements Initializa
|
||||||
@Override
|
@Override
|
||||||
public InitializationReport init() throws InitializationException {
|
public InitializationReport init() throws InitializationException {
|
||||||
log.debug("Called init");
|
log.debug("Called init");
|
||||||
|
InitializationReport report = null;
|
||||||
|
try {
|
||||||
// Creating all listeners
|
// Creating all listeners
|
||||||
EventListener<ItemObserved<Project>> listenerCreated = new EventListener<ItemObserved<Project>>() {
|
EventListener<ItemObserved<Project>> listenerCreated = new EventListener<ItemObserved<Project>>() {
|
||||||
|
|
||||||
|
@ -192,7 +196,14 @@ public class CatalogueBindingPlugin extends AbstractPlugin implements Initializa
|
||||||
eventMngInst.subscribe(Event.PROJECT_DELETED, listenerDeleted);
|
eventMngInst.subscribe(Event.PROJECT_DELETED, listenerDeleted);
|
||||||
eventMngInst.subscribe(Event.LIFECYCLE_STEP_PERFORMED, listenerLCStepPerformed);
|
eventMngInst.subscribe(Event.LIFECYCLE_STEP_PERFORMED, listenerLCStepPerformed);
|
||||||
|
|
||||||
return new InitializationReport(Status.OK, PLUGIN_ID + " init performed");
|
report = new InitializationReport(Status.OK, PLUGIN_ID + " init performed");
|
||||||
|
} catch (Exception e) {
|
||||||
|
InitializationException exc = new InitializationException("Unable to initialize " + DESCRIPTOR.getId(), e);
|
||||||
|
log.error("init error: {} ", exc);
|
||||||
|
throw exc;
|
||||||
|
}
|
||||||
|
|
||||||
|
return report;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,10 +26,10 @@ public class PluginsReflections {
|
||||||
.filterInputsBy(new FilterBuilder().includePackage("org.gcube.application.cms")));
|
.filterInputsBy(new FilterBuilder().includePackage("org.gcube.application.cms")));
|
||||||
|
|
||||||
reflections.getSubTypesOf(Plugin.class).iterator().forEachRemaining(pluginClass->{
|
reflections.getSubTypesOf(Plugin.class).iterator().forEachRemaining(pluginClass->{
|
||||||
log.trace("Evaluating class {}",pluginClass);
|
log.debug("Evaluating class {}",pluginClass);
|
||||||
if(!pluginClass.isInterface() && !Modifier.isAbstract(pluginClass.getModifiers())){
|
if(!pluginClass.isInterface() && !Modifier.isAbstract(pluginClass.getModifiers())){
|
||||||
try {
|
try {
|
||||||
log.debug("Found implementation {} ",pluginClass);
|
log.debug("\nFound implementation {} ",pluginClass);
|
||||||
Plugin plugin = pluginClass.newInstance();
|
Plugin plugin = pluginClass.newInstance();
|
||||||
log.debug("Loading {} description : {}", plugin, plugin.getDescriptor());
|
log.debug("Loading {} description : {}", plugin, plugin.getDescriptor());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue