Skip to content

Commit 430a29a

Browse files
aloubyanskyDavideD
authored andcommitted
Log just the error message instead of complete stacktraces from DevModeClient
1 parent b835469 commit 430a29a

File tree

1 file changed

+10
-4
lines changed
  • test-framework/devmode-test-utils/src/main/java/io/quarkus/test/devmode/util

1 file changed

+10
-4
lines changed

test-framework/devmode-test-utils/src/main/java/io/quarkus/test/devmode/util/DevModeClient.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,16 @@ public String getHttpResponse(String path, boolean allowError, Supplier<String>
190190
resp.set(content);
191191
return true;
192192
} catch (Exception e) {
193-
LOG.error(
194-
"An error occurred when DevModeClient accessed " + path
195-
+ ". It might be a normal testing behavior but logging the exception for information",
196-
e);
193+
var sb = new StringBuilder();
194+
sb.append("DevModeClient failed to accessed ").append(path)
195+
.append(". It might be a normal testing behavior but logging the messages for information: ")
196+
.append(e.getLocalizedMessage());
197+
var cause = e.getCause();
198+
while (cause != null) {
199+
sb.append(": ").append(cause.getLocalizedMessage());
200+
cause = cause.getCause();
201+
}
202+
LOG.error(sb);
197203
return false;
198204
}
199205
});

0 commit comments

Comments
 (0)