Skip to content

Commit

Permalink
Give StringBuilder an initial capacity of 256 (#150)
Browse files Browse the repository at this point in the history
closes #149
  • Loading branch information
echatman authored Oct 19, 2021
1 parent 2595ee9 commit 2f54195
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public void close() throws IOException {

@Override
public byte[] encode(ILoggingEvent event) {
StringBuilder builder = new StringBuilder();
StringBuilder builder = new StringBuilder(256);
EcsJsonSerializer.serializeObjectStart(builder, event.getTimeStamp());
EcsJsonSerializer.serializeLogLevel(builder, event.getLevel().toString());
EcsJsonSerializer.serializeFormattedMessage(builder, event.getFormattedMessage());
Expand Down

0 comments on commit 2f54195

Please sign in to comment.