BAEL-1300 Change to ConcurrentHashMap (#3206)

* BAEL-1300 Custom logback appender

* BAEL-1300 fix to logback module

* relativePath

* Change to ConcurrentHashMap
This commit is contained in:
Taylor Daugherty 2017-12-08 17:31:36 -05:00 committed by maibin
parent bb5a1697dd
commit dc334432e4
1 changed files with 4 additions and 2 deletions

View File

@ -3,12 +3,14 @@ package com.baeldung.logback;
import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.AppenderBase;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
public class MapAppender extends AppenderBase<ILoggingEvent> {
private final Map<String, ILoggingEvent> eventMap = new HashMap<>();
private final ConcurrentMap<String, ILoggingEvent> eventMap
= new ConcurrentHashMap<>();
private String prefix;