From: David ‘Bombe’ Roden Date: Wed, 26 Aug 2015 10:14:46 +0000 (+0200) Subject: Actually put reaction name in email text X-Git-Tag: v2~168 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=df774979f2dd5a40b6a584fef71d62932ca03a0e;p=rhynodge.git Actually put reaction name in email text --- diff --git a/src/main/java/net/pterodactylus/rhynodge/engine/ReactionRunner.java b/src/main/java/net/pterodactylus/rhynodge/engine/ReactionRunner.java index 2b6e6d4..e658f1b 100644 --- a/src/main/java/net/pterodactylus/rhynodge/engine/ReactionRunner.java +++ b/src/main/java/net/pterodactylus/rhynodge/engine/ReactionRunner.java @@ -48,7 +48,7 @@ public class ReactionRunner implements Runnable { State state = runQuery(); state = runStateThroughFilters(state); if (!state.success()) { - logger.info(format("Reaction %s failed.", reaction.name())); + logger.info(format("Reaction %s failed in %s.", reaction.name(), state)); saveStateWithIncreasedFailCount(state); errorEmailAction.execute(createErrorOutput(reaction, state)); return; @@ -84,7 +84,7 @@ public class ReactionRunner implements Runnable { private String createErrorEmailText(Reaction reaction, State state) { StringBuilder emailText = new StringBuilder(); - emailText.append(String.format("An error occured while processing “.”\n\n", reaction.name())); + emailText.append(String.format("An error occured while processing “%s.”\n\n", reaction.name())); appendExceptionToEmailText(state.exception(), emailText); return emailText.toString(); }