Plugin error stack traces (#369)

Because of how the Log4J2 api works exception stack traces were not
being printed.  Update to use the explicit "throwable" overloaded
methods.

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
This commit is contained in:
Danno Ferrin
2020-02-07 06:03:55 -07:00
committed by GitHub
parent b6e25567a1
commit f4b921b7fc

View File

@@ -96,8 +96,9 @@ public class BesuPluginContextImpl implements BesuContext, PluginVersionsProvide
addPluginVersion(plugin);
} catch (final Exception e) {
LOG.error(
"Error registering plugin of type {}, start and stop will not be called. \n{}",
plugin.getClass(),
"Error registering plugin of type "
+ plugin.getClass().getName()
+ ", start and stop will not be called.",
e);
continue;
}
@@ -140,8 +141,9 @@ public class BesuPluginContextImpl implements BesuContext, PluginVersionsProvide
LOG.debug("Started plugin of type {}.", plugin.getClass().getName());
} catch (final Exception e) {
LOG.error(
"Error starting plugin of type {}, stop will not be called. \n{}",
plugin.getClass(),
"Error starting plugin of type "
+ plugin.getClass().getName()
+ ", stop will not be called.",
e);
pluginsIterator.remove();
}
@@ -164,7 +166,7 @@ public class BesuPluginContextImpl implements BesuContext, PluginVersionsProvide
plugin.stop();
LOG.debug("Stopped plugin of type {}.", plugin.getClass().getName());
} catch (final Exception e) {
LOG.error("Error stopping plugin of type {}. \n{}", plugin.getClass(), e);
LOG.error("Error stopping plugin of type " + plugin.getClass().getName(), e);
}
}