From ef5e8c9c2283e418b12616d57f1e21bcde89c017 Mon Sep 17 00:00:00 2001 From: occidere Date: Thu, 24 Sep 2020 17:10:34 +0900 Subject: [PATCH] [BE-TASKS] Enhance ReactionWatchTask Logging --- .../org/occidere/githubwatcher/task/ReactionWatchTask.scala | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/scala/org/occidere/githubwatcher/task/ReactionWatchTask.scala b/src/main/scala/org/occidere/githubwatcher/task/ReactionWatchTask.scala index 39e6af9..e0c7463 100644 --- a/src/main/scala/org/occidere/githubwatcher/task/ReactionWatchTask.scala +++ b/src/main/scala/org/occidere/githubwatcher/task/ReactionWatchTask.scala @@ -30,13 +30,12 @@ object ReactionWatchTask extends Task with GithubWatcherLogger { // Diff & Send line message val changedReactions = latestReactions.filter(latest => { val diff = ReactionDiff(prevReactions.getOrElse(latest.uniqueKey, copyReactionWithoutCounts(latest)), latest) - println(s"repo: ${diff.latestReaction.repoOwnerLogin}/${diff.latestReaction.repoName}, changed: ${diff.hasChanged}") Try(if (diff.hasChanged) LineMessengerService.sendReactionMessage(diff)) match { case Failure(e) => - logger.error(s"${latest.uniqueKey} process failed", e) + logger.error(s"${latest.uniqueKey} process failed (htmlUrl: ${latest.htmlUrl})", e) false case Success(_) => - logger.info(s"${latest.uniqueKey} process success") + logger.info(s"${latest.uniqueKey} process success (htmlUrl: ${latest.htmlUrl})") diff.hasChanged } })