From d9bb2d05c2f45baa0e3ed58ed75e85cc704a3d47 Mon Sep 17 00:00:00 2001 From: Matej Novotny Date: Wed, 23 Nov 2022 13:03:33 +0100 Subject: [PATCH] Arc - improve transactional OM error logging to include more information by default --- .../src/main/java/io/quarkus/arc/impl/EventImpl.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/EventImpl.java b/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/EventImpl.java index 02dc46778014d..3a428d799dc54 100644 --- a/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/EventImpl.java +++ b/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/EventImpl.java @@ -473,8 +473,13 @@ public void run() { } catch (Exception e) { // swallow exception and log errors for every problematic OM LOG.errorf( - "Failure occurred while notifying a transational %s for event of type %s \n- please enable debug logging to see the full stack trace", - observerMethod, eventContext.getMetadata().getType().getTypeName()); + "Failure occurred while notifying a transational %s for event of type %s " + + "\n- please enable debug logging to see the full stack trace" + + "\n %s", + observerMethod, eventContext.getMetadata().getType().getTypeName(), + e.getCause() != null && e.getMessage() != null + ? "Cause: " + e.getCause() + " Message: " + e.getMessage() + : "Exception caught: " + e); LOG.debugf(e, "Failure occurred while notifying a transational %s for event of type %s", observerMethod, eventContext.getMetadata().getType().getTypeName()); }