Skip to content

Commit

Permalink
Support logging exception messages in UTF-16 because some libs may us…
Browse files Browse the repository at this point in the history
…e UTF-16 encoding
  • Loading branch information
JamesChenX committed Apr 17, 2024
1 parent cbe27a3 commit a4bbbf1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ private void appendException(Throwable e, ByteBuf buffer, int indent, int depth)
String message = e.getMessage();
if (message != null) {
buffer.writeBytes(COLON)
.writeBytes(StringUtil.getBytes(message));
.writeBytes(StringUtil.getUtf8Bytes(message));
}

StackTraceElement[] stacks = e.getStackTrace();
Expand Down

0 comments on commit a4bbbf1

Please sign in to comment.