mirror of
https://github.com/tiennm99/tjahzi.git
synced 2026-10-16 16:15:57 +00:00
Re #74: Created StringBuilders thread local holder and using thread local StringBuilder in Log4jAdapterLabelPrinter that can be shared between many threads.
This commit is contained in:
1 parent
1a7694a89b
commit
fb09f5664e
1 file changed
+1
-1
+1
-1
@@ -20,7 +20,7 @@ public class Log4jAdapterLabelPrinter implements LabelPrinter {
|
||||
|
||||
@Override
|
||||
public void append(LogEvent event, Consumer<CharSequence> appendable) {
|
||||
outputBuffer.setLength(0);
|
||||
StringBuilder outputBuffer = StringBuilders.threadLocal();
|
||||
|
||||
for (int i = 0; i < formatters.size(); i++) {
|
||||
formatters.get(i).format(event, outputBuffer);
|
||||
|
||||
Reference in new issue
Block a user