From f2e39a634d54025fecc6c121da26e02e968cb61b Mon Sep 17 00:00:00 2001 From: "Frank.R.Wu" Date: Fri, 10 Dec 2021 17:39:49 +0800 Subject: [PATCH] feat: update logs in event mechanism update LOGGER.warn in exception handling in ContractConsumer to LOGGER.error --- .../java/org/bdware/sc/event/clients/ContractConsumer.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/bdware/sc/event/clients/ContractConsumer.java b/src/main/java/org/bdware/sc/event/clients/ContractConsumer.java index 8fef7c0..6422814 100644 --- a/src/main/java/org/bdware/sc/event/clients/ContractConsumer.java +++ b/src/main/java/org/bdware/sc/event/clients/ContractConsumer.java @@ -92,14 +92,16 @@ public class ContractConsumer implements IEventConsumer { if (callCount.get() == TIMEOUT_COUNT || (result.status == ContractResult.Status.Exception && result.result.toString().contains("not exported"))) { - LOGGER.warn("receiving event error: request failed!"); + LOGGER.error(String.format( + "receiving event error! %s.%s: %s", contract, handler, str)); rc.onResult((String) null); } else { ret = false; } } } catch (Exception e) { - LOGGER.warn("receiving event error! " + contract + "." + handler + ": " + e.getMessage()); + LOGGER.error(String.format( + "receiving event error! %s.%s: %s", contract, handler, e.getMessage())); rc.onResult((String) null); } callCount.incrementAndGet();