Skip to content

Commit

Permalink
Plugin error stack traces (#369)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
shemnon authored Feb 7, 2020
1 parent b6e2556 commit f4b921b
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ public void registerPlugins(final Path pluginsDir) {
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;
}
Expand Down Expand Up @@ -140,8 +141,9 @@ public void startPlugins() {
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();
}
Expand All @@ -164,7 +166,7 @@ public void stopPlugins() {
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);
}
}

Expand Down

0 comments on commit f4b921b

Please sign in to comment.