mirror of
https://gitee.com/BDWare/cm
synced 2025-01-10 09:54:03 +00:00
feat: update logs in event mechanism
update LOGGER.warn in exception handling in ContractConsumer to LOGGER.error
This commit is contained in:
parent
a9ba6fea6e
commit
f2e39a634d
@ -92,14 +92,16 @@ public class ContractConsumer implements IEventConsumer {
|
|||||||
if (callCount.get() == TIMEOUT_COUNT ||
|
if (callCount.get() == TIMEOUT_COUNT ||
|
||||||
(result.status == ContractResult.Status.Exception &&
|
(result.status == ContractResult.Status.Exception &&
|
||||||
result.result.toString().contains("not exported"))) {
|
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);
|
rc.onResult((String) null);
|
||||||
} else {
|
} else {
|
||||||
ret = false;
|
ret = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} 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);
|
rc.onResult((String) null);
|
||||||
}
|
}
|
||||||
callCount.incrementAndGet();
|
callCount.incrementAndGet();
|
||||||
|
Loading…
Reference in New Issue
Block a user