Adapt the fix for (github for java 7
@@ -72,7 +72,13 @@ import org.apache.logging.log4j.util.Strings;
@Plugin(name = "asyncLogger", category = Node.CATEGORY, printObject = true)
public class AsyncLoggerConfig extends LoggerConfig {
- private static final ThreadLocal<Boolean> ASYNC_LOGGER_ENTERED = ThreadLocal.withInitial(() -> Boolean.FALSE);
+ private static final ThreadLocal<Boolean> ASYNC_LOGGER_ENTERED = new ThreadLocal<Boolean>() {
+ @Override
+ protected Boolean initialValue() {
+ return Boolean.FALSE;
+ }
+ };
+
private final AsyncLoggerConfigDelegate delegate;
protected AsyncLoggerConfig(final String name,
