Repository: logging-log4j2 Updated Branches: refs/heads/master debc56407 -> 7007b861c
LOG4J2-1010 moved ContextDataInjector from core.impl to core package Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/7007b861 Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/7007b861 Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/7007b861 Branch: refs/heads/master Commit: 7007b861cc77dac2b693b9b21a699e3b64c2aefd Parents: debc564 Author: rpopma <rpo...@apache.org> Authored: Sat Sep 17 02:39:03 2016 +0900 Committer: rpopma <rpo...@apache.org> Committed: Sat Sep 17 02:39:03 2016 +0900 ---------------------------------------------------------------------- .../logging/log4j/core/ContextDataInjector.java | 107 +++++++++++++++++++ .../org/apache/logging/log4j/core/LogEvent.java | 2 +- .../logging/log4j/core/async/AsyncLogger.java | 2 +- .../async/RingBufferLogEventTranslator.java | 2 +- .../core/filter/DynamicThresholdFilter.java | 3 +- .../core/filter/ThreadContextMapFilter.java | 3 +- .../log4j/core/impl/ContextDataInjector.java | 105 ------------------ .../core/impl/ContextDataInjectorFactory.java | 1 + .../logging/log4j/core/impl/Log4jLogEvent.java | 1 + .../core/impl/ReusableLogEventFactory.java | 1 + .../core/impl/ThreadContextDataInjector.java | 1 + .../log4j/core/lookup/ContextMapLookup.java | 3 +- .../log4j/perf/jmh/ThreadContextBenchmark.java | 2 +- 13 files changed, 118 insertions(+), 115 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/7007b861/log4j-core/src/main/java/org/apache/logging/log4j/core/ContextDataInjector.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/ContextDataInjector.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/ContextDataInjector.java new file mode 100644 index 0000000..93f719b --- /dev/null +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/ContextDataInjector.java @@ -0,0 +1,107 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache license, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the license for the specific language governing permissions and + * limitations under the license. + */ +package org.apache.logging.log4j.core; + +import java.util.List; + +import org.apache.logging.log4j.core.config.Property; +import org.apache.logging.log4j.core.impl.ContextDataInjectorFactory; +import org.apache.logging.log4j.core.impl.ThreadContextDataInjector; +import org.apache.logging.log4j.spi.ContextData; +import org.apache.logging.log4j.spi.MutableContextData; + +/** + * Responsible for initializing the ContextData of LogEvents. Context data is data that is set by the application to be + * included in all subsequent log events. + * <p> + * The source of the context data is implementation-specific. The default source for context data is the ThreadContext. + * </p><p> + * In some asynchronous models, work may be delegated to several threads, while conceptually this work shares the same + * context. In such models, storing context data in {@code ThreadLocal} variables is not convenient or desirable. + * Users can configure the {@code ContextDataInjectorFactory} to provide custom {@code ContextDataInjector} objects, + * in order to initialize log events with context data from any arbitrary context. + * </p><p> + * When providing a custom {@code ContextDataInjector}, be aware that the {@code ContextDataFactory} may be invoked + * multiple times and the various components in Log4j that need access to context data may each have their own instance + * of {@code ContextDataInjector}. + * This includes the object(s) that populate log events, but also various lookups and filters that look at + * context data to determine whether an event should be logged. + * </p><p> + * Implementors should take particular note of how the different methods in the interface have different thread-safety + * guarantees to enable optimal performance. + * </p> + * + * @see ContextData + * @see ContextDataInjectorFactory + * @see org.apache.logging.log4j.ThreadContext + * @see ThreadContextDataInjector + * @since 2.7 + */ +public interface ContextDataInjector { + /** + * Returns a {@code MutableContextData} object initialized with the specified properties and the appropriate + * context data. The returned value may be the specified parameter or a different object. + * <p> + * This method will be called for each log event to initialize its context data and implementors should take + * care to make this method as performant as possible while preserving at least the following thread-safety + * guarantee. + * </p><p> + * Thread-safety note: The returned object can safely be passed off to another thread: future changes in the + * underlying context data will not be reflected in the returned object. + * </p><p> + * Example implementation: + * </p> + * <pre> + * public MutableContextData injectContextData(List<Property> properties, MutableContextData reusable) { + * if (properties == null || properties.isEmpty()) { + * // assume context data is stored in a copy-on-write data structure that is safe to pass to another thread + * return (MutableContextData) rawContextData(); + * } + * // first copy configuration properties into the result + * ThreadContextDataInjector.copyProperties(properties, reusable); + * + * // then copy context data key-value pairs (may overwrite configuration properties) + * reusable.addAll(rawContextData()); + * return reusable; + * } + * </pre> + * + * @param properties Properties from the log4j configuration to be added to the resulting ContextData. May be + * {@code null} or empty + * @param reusable a {@code MutableContextData} instance that may be reused to avoid creating temporary objects + * @return a {@code MutableContextData} instance initialized with the specified properties and the appropriate + * context data. The returned value may be the specified parameter or a different object. + * @see ThreadContextDataInjector#copyProperties(List, MutableContextData) + */ + MutableContextData injectContextData(final List<Property> properties, final MutableContextData reusable); + + /** + * Returns a {@code ContextData} object reflecting the current state of the context. Configuration properties + * are not included in the result. + * <p> + * This method may be called multiple times for each log event by Filters and Lookups and implementors should take + * care to make this method as performant as possible while preserving at least the following thread-safety + * guarantee. + * </p><p> + * Thread-safety note: The returned object can only be safely used <em>in the current thread</em>. Changes in the + * underlying context may or may not be reflected in the returned object, depending on the context data source and + * the implementation of this method. It is not safe to pass the returned object to another thread. + * </p> + * @return a {@code ContextData} object reflecting the current state of the context + */ + ContextData rawContextData(); +} http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/7007b861/log4j-core/src/main/java/org/apache/logging/log4j/core/LogEvent.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/LogEvent.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/LogEvent.java index 9bdd4bf..bbcea0d 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/LogEvent.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/LogEvent.java @@ -43,7 +43,7 @@ import org.apache.logging.log4j.spi.ContextData; * Since version 2.7, {@link #getContextMap()} is deprecated in favor of {@link #getContextData()}, which * can carry both {@code ThreadContext} data as well as other context data supplied by the * {@linkplain org.apache.logging.log4j.core.impl.ContextDataInjectorFactory configured} - * {@link org.apache.logging.log4j.core.impl.ContextDataInjector}. + * {@link ContextDataInjector}. * </p> */ public interface LogEvent extends Serializable { http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/7007b861/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLogger.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLogger.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLogger.java index 23322e2..46f5c7b 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLogger.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLogger.java @@ -28,7 +28,7 @@ import org.apache.logging.log4j.core.config.Configuration; import org.apache.logging.log4j.core.config.Property; import org.apache.logging.log4j.core.config.ReliabilityStrategy; import org.apache.logging.log4j.core.impl.ContextDataFactory; -import org.apache.logging.log4j.core.impl.ContextDataInjector; +import org.apache.logging.log4j.core.ContextDataInjector; import org.apache.logging.log4j.core.impl.ContextDataInjectorFactory; import org.apache.logging.log4j.core.impl.Log4jLogEvent; import org.apache.logging.log4j.core.util.Clock; http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/7007b861/log4j-core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEventTranslator.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEventTranslator.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEventTranslator.java index 04d9ce1..facfc57 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEventTranslator.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEventTranslator.java @@ -19,7 +19,7 @@ package org.apache.logging.log4j.core.async; import org.apache.logging.log4j.Level; import org.apache.logging.log4j.Marker; import org.apache.logging.log4j.ThreadContext.ContextStack; -import org.apache.logging.log4j.core.impl.ContextDataInjector; +import org.apache.logging.log4j.core.ContextDataInjector; import org.apache.logging.log4j.core.impl.ContextDataInjectorFactory; import org.apache.logging.log4j.spi.MutableContextData; import org.apache.logging.log4j.message.Message; http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/7007b861/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/DynamicThresholdFilter.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/DynamicThresholdFilter.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/DynamicThresholdFilter.java index 9debae7..d52f1ec 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/DynamicThresholdFilter.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/DynamicThresholdFilter.java @@ -31,12 +31,11 @@ import org.apache.logging.log4j.core.config.plugins.Plugin; import org.apache.logging.log4j.core.config.plugins.PluginAttribute; import org.apache.logging.log4j.core.config.plugins.PluginElement; import org.apache.logging.log4j.core.config.plugins.PluginFactory; -import org.apache.logging.log4j.core.impl.ContextDataInjector; +import org.apache.logging.log4j.core.ContextDataInjector; import org.apache.logging.log4j.core.impl.ContextDataInjectorFactory; import org.apache.logging.log4j.core.util.KeyValuePair; import org.apache.logging.log4j.message.Message; import org.apache.logging.log4j.spi.ContextData; -import org.apache.logging.log4j.spi.MutableContextData; /** * Compares against a log level that is associated with a context value. By default the context is the http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/7007b861/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/ThreadContextMapFilter.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/ThreadContextMapFilter.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/ThreadContextMapFilter.java index 59768e3..d10ea12 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/ThreadContextMapFilter.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/ThreadContextMapFilter.java @@ -33,12 +33,11 @@ import org.apache.logging.log4j.core.config.plugins.PluginAliases; import org.apache.logging.log4j.core.config.plugins.PluginAttribute; import org.apache.logging.log4j.core.config.plugins.PluginElement; import org.apache.logging.log4j.core.config.plugins.PluginFactory; -import org.apache.logging.log4j.core.impl.ContextDataInjector; +import org.apache.logging.log4j.core.ContextDataInjector; import org.apache.logging.log4j.core.impl.ContextDataInjectorFactory; import org.apache.logging.log4j.core.util.KeyValuePair; import org.apache.logging.log4j.message.Message; import org.apache.logging.log4j.spi.ContextData; -import org.apache.logging.log4j.spi.MutableContextData; /** * Filter based on a value in the Thread Context Map (MDC). http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/7007b861/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ContextDataInjector.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ContextDataInjector.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ContextDataInjector.java deleted file mode 100644 index a74201b..0000000 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ContextDataInjector.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache license, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the license for the specific language governing permissions and - * limitations under the license. - */ -package org.apache.logging.log4j.core.impl; - -import java.util.List; - -import org.apache.logging.log4j.core.config.Property; -import org.apache.logging.log4j.spi.ContextData; -import org.apache.logging.log4j.spi.MutableContextData; - -/** - * Responsible for initializing the ContextData of LogEvents. Context data is data that is set by the application to be - * included in all subsequent log events. - * <p> - * The source of the context data is implementation-specific. The default source for context data is the ThreadContext. - * </p><p> - * In some asynchronous models, work may be delegated to several threads, while conceptually this work shares the same - * context. In such models, storing context data in {@code ThreadLocal} variables is not convenient or desirable. - * Users can configure the {@code ContextDataInjectorFactory} to provide custom {@code ContextDataInjector} objects, - * in order to initialize log events with context data from any arbitrary context. - * </p><p> - * When providing a custom {@code ContextDataInjector}, be aware that the {@code ContextDataFactory} may be invoked - * multiple times and the various components in Log4j that need access to context data may each have their own instance - * of {@code ContextDataInjector}. - * This includes the object(s) that populate log events, but also various lookups and filters that look at - * context data to determine whether an event should be logged. - * </p><p> - * Implementors should take particular note of how the different methods in the interface have different thread-safety - * guarantees to enable optimal performance. - * </p> - * - * @see ContextData - * @see ContextDataInjectorFactory - * @see org.apache.logging.log4j.ThreadContext - * @see ThreadContextDataInjector - * @since 2.7 - */ -public interface ContextDataInjector { - /** - * Returns a {@code MutableContextData} object initialized with the specified properties and the appropriate - * context data. The returned value may be the specified parameter or a different object. - * <p> - * This method will be called for each log event to initialize its context data and implementors should take - * care to make this method as performant as possible while preserving at least the following thread-safety - * guarantee. - * </p><p> - * Thread-safety note: The returned object can safely be passed off to another thread: future changes in the - * underlying context data will not be reflected in the returned object. - * </p><p> - * Example implementation: - * </p> - * <pre> - * public MutableContextData injectContextData(List<Property> properties, MutableContextData reusable) { - * if (properties == null || properties.isEmpty()) { - * // assume context data is stored in a copy-on-write data structure that is safe to pass to another thread - * return (MutableContextData) rawContextData(); - * } - * // first copy configuration properties into the result - * ThreadContextDataInjector.copyProperties(properties, reusable); - * - * // then copy context data key-value pairs (may overwrite configuration properties) - * reusable.addAll(rawContextData()); - * return reusable; - * } - * </pre> - * - * @param properties Properties from the log4j configuration to be added to the resulting ContextData. May be - * {@code null} or empty - * @param reusable a {@code MutableContextData} instance that may be reused to avoid creating temporary objects - * @return a {@code MutableContextData} instance initialized with the specified properties and the appropriate - * context data. The returned value may be the specified parameter or a different object. - * @see ThreadContextDataInjector#copyProperties(List, MutableContextData) - */ - MutableContextData injectContextData(final List<Property> properties, final MutableContextData reusable); - - /** - * Returns a {@code ContextData} object reflecting the current state of the context. Configuration properties - * are not included in the result. - * <p> - * This method may be called multiple times for each log event by Filters and Lookups and implementors should take - * care to make this method as performant as possible while preserving at least the following thread-safety - * guarantee. - * </p><p> - * Thread-safety note: The returned object can only be safely used <em>in the current thread</em>. Changes in the - * underlying context may or may not be reflected in the returned object, depending on the context data source and - * the implementation of this method. It is not safe to pass the returned object to another thread. - * </p> - * @return a {@code ContextData} object reflecting the current state of the context - */ - ContextData rawContextData(); -} http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/7007b861/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ContextDataInjectorFactory.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ContextDataInjectorFactory.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ContextDataInjectorFactory.java index 511a618..31e1013 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ContextDataInjectorFactory.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ContextDataInjectorFactory.java @@ -17,6 +17,7 @@ package org.apache.logging.log4j.core.impl; import org.apache.logging.log4j.ThreadContextAccess; +import org.apache.logging.log4j.core.ContextDataInjector; import org.apache.logging.log4j.core.LogEvent; import org.apache.logging.log4j.spi.ContextData; import org.apache.logging.log4j.spi.CopyOnWrite; http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/7007b861/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/Log4jLogEvent.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/Log4jLogEvent.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/Log4jLogEvent.java index f8af061..7b7f038 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/Log4jLogEvent.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/Log4jLogEvent.java @@ -26,6 +26,7 @@ import java.util.Objects; import org.apache.logging.log4j.Level; import org.apache.logging.log4j.Marker; import org.apache.logging.log4j.ThreadContext; +import org.apache.logging.log4j.core.ContextDataInjector; import org.apache.logging.log4j.spi.ContextData; import org.apache.logging.log4j.core.LogEvent; import org.apache.logging.log4j.core.async.RingBufferLogEvent; http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/7007b861/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ReusableLogEventFactory.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ReusableLogEventFactory.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ReusableLogEventFactory.java index 748148b..7b27386 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ReusableLogEventFactory.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ReusableLogEventFactory.java @@ -21,6 +21,7 @@ import java.util.List; import org.apache.logging.log4j.Level; import org.apache.logging.log4j.Marker; import org.apache.logging.log4j.ThreadContext; +import org.apache.logging.log4j.core.ContextDataInjector; import org.apache.logging.log4j.core.LogEvent; import org.apache.logging.log4j.core.async.ThreadNameCachingStrategy; import org.apache.logging.log4j.core.config.Property; http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/7007b861/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ThreadContextDataInjector.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ThreadContextDataInjector.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ThreadContextDataInjector.java index 65980f7..2bfa69c 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ThreadContextDataInjector.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ThreadContextDataInjector.java @@ -21,6 +21,7 @@ import java.util.Map; import org.apache.logging.log4j.ThreadContext; import org.apache.logging.log4j.ThreadContextAccess; +import org.apache.logging.log4j.core.ContextDataInjector; import org.apache.logging.log4j.core.config.Property; import org.apache.logging.log4j.spi.ContextData; import org.apache.logging.log4j.spi.MutableContextData; http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/7007b861/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/ContextMapLookup.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/ContextMapLookup.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/ContextMapLookup.java index 6bffb2b..3d4a1a0 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/ContextMapLookup.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/ContextMapLookup.java @@ -19,10 +19,9 @@ package org.apache.logging.log4j.core.lookup; import org.apache.logging.log4j.ThreadContext; import org.apache.logging.log4j.core.LogEvent; import org.apache.logging.log4j.core.config.plugins.Plugin; -import org.apache.logging.log4j.core.impl.ContextDataInjector; +import org.apache.logging.log4j.core.ContextDataInjector; import org.apache.logging.log4j.core.impl.ContextDataInjectorFactory; import org.apache.logging.log4j.spi.ContextData; -import org.apache.logging.log4j.spi.MutableContextData; /** * Looks up keys from the context. By default this is the {@link ThreadContext}, but users may http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/7007b861/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/ThreadContextBenchmark.java ---------------------------------------------------------------------- diff --git a/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/ThreadContextBenchmark.java b/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/ThreadContextBenchmark.java index c45f4c6..3f1ecbf 100644 --- a/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/ThreadContextBenchmark.java +++ b/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/ThreadContextBenchmark.java @@ -28,7 +28,7 @@ import java.util.concurrent.TimeUnit; import org.apache.logging.log4j.ThreadContext; import org.apache.logging.log4j.ThreadContextBenchmarkAccess; import org.apache.logging.log4j.core.config.Property; -import org.apache.logging.log4j.core.impl.ContextDataInjector; +import org.apache.logging.log4j.core.ContextDataInjector; import org.apache.logging.log4j.core.impl.ContextDataInjectorFactory; import org.apache.logging.log4j.perf.nogc.OpenHashMapContextData; import org.apache.logging.log4j.spi.CopyOnWriteOpenHashMapThreadContextMap;