jvz commented on code in PR #1194: URL: https://github.com/apache/logging-log4j2/pull/1194#discussion_r1071590262
########## log4j-core/src/main/java/org/apache/logging/log4j/core/layout/GelfLayout.java: ########## @@ -598,12 +636,22 @@ private StringBuilder toText(final LogEvent event, final StringBuilder builder, if (event.getThrown() != null || layout != null) { builder.append("\"full_message\":\""); if (layout != null) { - final StringBuilder messageBuffer = getMessageStringBuilder(); - layout.serialize(event, messageBuffer); - JsonUtils.quoteAsString(messageBuffer, builder); + final StringBuilder messageBuffer = acquireStringBuilder(); Review Comment: Interesting little use case where you can now abuse the recursion support in `ThreadLocalRecyclerFactory` to get multiple recyclable objects. Already works as expected with the `QueueingRecyclerFactory` version. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org