diff --git a/logger/src/main/java/com/orhanobut/logger/LoggerPrinter.java b/logger/src/main/java/com/orhanobut/logger/LoggerPrinter.java index bdd25530..1bc65b0d 100644 --- a/logger/src/main/java/com/orhanobut/logger/LoggerPrinter.java +++ b/logger/src/main/java/com/orhanobut/logger/LoggerPrinter.java @@ -9,8 +9,8 @@ import java.io.StringReader; import java.io.StringWriter; -import java.util.ArrayList; import java.util.List; +import java.util.concurrent.CopyOnWriteArrayList; import javax.xml.transform.OutputKeys; import javax.xml.transform.Source; @@ -40,7 +40,7 @@ class LoggerPrinter implements Printer { */ private final ThreadLocal localTag = new ThreadLocal<>(); - private final List logAdapters = new ArrayList<>(); + private final List logAdapters = new CopyOnWriteArrayList<>(); @Override public Printer t(String tag) { if (tag != null) {