From f4b921b7fc84759dfc62cb01193b7d917ca94ce0 Mon Sep 17 00:00:00 2001 From: Danno Ferrin Date: Fri, 7 Feb 2020 06:03:55 -0700 Subject: [PATCH] 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 --- .../besu/services/BesuPluginContextImpl.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/besu/src/main/java/org/hyperledger/besu/services/BesuPluginContextImpl.java b/besu/src/main/java/org/hyperledger/besu/services/BesuPluginContextImpl.java index 791edb39506..2a5531be785 100644 --- a/besu/src/main/java/org/hyperledger/besu/services/BesuPluginContextImpl.java +++ b/besu/src/main/java/org/hyperledger/besu/services/BesuPluginContextImpl.java @@ -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; } @@ -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(); } @@ -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); } }