diff --git a/java/server/src/org/openqa/selenium/remote/server/log/ShortTermMemoryHandler.java b/java/server/src/org/openqa/selenium/remote/server/log/ShortTermMemoryHandler.java index a5eef8829dbba..02efbf98cc66b 100644 --- a/java/server/src/org/openqa/selenium/remote/server/log/ShortTermMemoryHandler.java +++ b/java/server/src/org/openqa/selenium/remote/server/log/ShortTermMemoryHandler.java @@ -55,7 +55,7 @@ public ShortTermMemoryHandler(int capacity, Level minimumLevel, Formatter format @Override - public void publish(LogRecord record) { + public synchronized void publish(LogRecord record) { if (record.getLevel().intValue() < minimumLevel) { return; } @@ -67,12 +67,12 @@ public void publish(LogRecord record) { } @Override - public void flush() { + public synchronized void flush() { /* NOOP */ } @Override - public void close() throws SecurityException { + public synchronized void close() throws SecurityException { for (int i = 0; i < capacity; i++) { lastRecords[i] = null; } @@ -95,7 +95,7 @@ public synchronized LogRecord[] records() { return validRecords.toArray(new LogRecord[validRecords.size()]); } - public String formattedRecords() { + public synchronized String formattedRecords() { final StringWriter writer; writer = new StringWriter();