This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch api-queue in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit ab1c1fe7f67e14879e6ac571bd7fbb65ee2788fa Author: Volkan Yazıcı <[email protected]> AuthorDate: Mon Dec 18 11:45:18 2023 +0100 Move JCTools dependencies from `log4j-core` to `log4j-jctools` --- .../recycler/RecyclerFactoryRegistryTest.java | 2 +- ...sTestUtil.java => RecyclerFactoryTestUtil.java} | 4 +- .../ThreadLocalRecyclerFactoryProviderTest.java | 2 +- log4j-core-its/pom.xml | 6 -- log4j-core-test/pom.xml | 6 -- .../log4j/core/appender/AsyncAppenderTest.java | 8 --- .../log4j/core/async/perftest/RunJCTools.java | 29 --------- log4j-core/pom.xml | 7 -- log4j-gctests/pom.xml | 6 -- log4j-jctools/pom.xml | 6 ++ .../jctools}/JCToolsBlockingQueueFactory.java | 9 +-- ...er.java => JCToolsRecyclerFactoryProvider.java} | 16 ++--- .../jctools/JCToolsBlockingQueueFactoryTest.java | 76 ++++++++++++++++++++++ ...ava => JCToolsRecyclerFactoryProviderTest.java} | 4 +- .../resources/JCToolsBlockingQueueFactoryTest.xml | 2 +- ...ging.log4j.spi.recycler.RecyclerFactoryProvider | 2 +- log4j-layout-template-json-test/pom.xml | 6 -- ...rFactoryCustomizedJsonTemplateLayoutLogging.xml | 30 --------- log4j-layout-template-json/pom.xml | 5 -- pom.xml | 12 ++-- src/site/asciidoc/manual/appenders.adoc | 1 + src/site/asciidoc/runtime-dependencies.adoc | 4 -- 22 files changed, 109 insertions(+), 134 deletions(-) diff --git a/log4j-api-test/src/test/java/org/apache/logging/log4j/internal/recycler/RecyclerFactoryRegistryTest.java b/log4j-api-test/src/test/java/org/apache/logging/log4j/internal/recycler/RecyclerFactoryRegistryTest.java index 8793c1244e..f6684f63cc 100644 --- a/log4j-api-test/src/test/java/org/apache/logging/log4j/internal/recycler/RecyclerFactoryRegistryTest.java +++ b/log4j-api-test/src/test/java/org/apache/logging/log4j/internal/recycler/RecyclerFactoryRegistryTest.java @@ -16,7 +16,7 @@ */ package org.apache.logging.log4j.internal.recycler; -import static org.apache.logging.log4j.internal.recycler.RecyclerFactoriesTestUtil.createForEnvironment; +import static org.apache.logging.log4j.internal.recycler.RecyclerFactoryTestUtil.createForEnvironment; import static org.apache.logging.log4j.spi.recycler.Recycler.DEFAULT_CAPACITY; import static org.assertj.core.api.Assertions.assertThat; diff --git a/log4j-api-test/src/test/java/org/apache/logging/log4j/internal/recycler/RecyclerFactoriesTestUtil.java b/log4j-api-test/src/test/java/org/apache/logging/log4j/internal/recycler/RecyclerFactoryTestUtil.java similarity index 95% rename from log4j-api-test/src/test/java/org/apache/logging/log4j/internal/recycler/RecyclerFactoriesTestUtil.java rename to log4j-api-test/src/test/java/org/apache/logging/log4j/internal/recycler/RecyclerFactoryTestUtil.java index 44422a3319..a6c8f99a2c 100644 --- a/log4j-api-test/src/test/java/org/apache/logging/log4j/internal/recycler/RecyclerFactoriesTestUtil.java +++ b/log4j-api-test/src/test/java/org/apache/logging/log4j/internal/recycler/RecyclerFactoryTestUtil.java @@ -23,9 +23,9 @@ import org.apache.logging.log4j.spi.recycler.RecyclerFactoryRegistry; import org.apache.logging.log4j.util.PropertiesUtil; import org.apache.logging.log4j.util.PropertyEnvironment; -final class RecyclerFactoriesTestUtil { +final class RecyclerFactoryTestUtil { - private RecyclerFactoriesTestUtil() {} + private RecyclerFactoryTestUtil() {} @Nullable static RecyclerFactory createForEnvironment( diff --git a/log4j-api-test/src/test/java/org/apache/logging/log4j/internal/recycler/ThreadLocalRecyclerFactoryProviderTest.java b/log4j-api-test/src/test/java/org/apache/logging/log4j/internal/recycler/ThreadLocalRecyclerFactoryProviderTest.java index 7ccde99823..147a84e52c 100644 --- a/log4j-api-test/src/test/java/org/apache/logging/log4j/internal/recycler/ThreadLocalRecyclerFactoryProviderTest.java +++ b/log4j-api-test/src/test/java/org/apache/logging/log4j/internal/recycler/ThreadLocalRecyclerFactoryProviderTest.java @@ -16,7 +16,7 @@ */ package org.apache.logging.log4j.internal.recycler; -import static org.apache.logging.log4j.internal.recycler.RecyclerFactoriesTestUtil.createForEnvironment; +import static org.apache.logging.log4j.internal.recycler.RecyclerFactoryTestUtil.createForEnvironment; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/log4j-core-its/pom.xml b/log4j-core-its/pom.xml index c1dee9b916..2b38ca60b5 100644 --- a/log4j-core-its/pom.xml +++ b/log4j-core-its/pom.xml @@ -72,12 +72,6 @@ <artifactId>jackson-dataformat-yaml</artifactId> <optional>true</optional> </dependency> - <!-- Alternative implementation of BlockingQueue using JCTools for AsyncAppender --> - <dependency> - <groupId>org.jctools</groupId> - <artifactId>jctools-core</artifactId> - <optional>true</optional> - </dependency> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter-engine</artifactId> diff --git a/log4j-core-test/pom.xml b/log4j-core-test/pom.xml index ec7e071ee0..bd3a339e2a 100644 --- a/log4j-core-test/pom.xml +++ b/log4j-core-test/pom.xml @@ -155,12 +155,6 @@ <artifactId>jansi</artifactId> <optional>true</optional> </dependency> - <!-- Alternative implementation of BlockingQueue using JCTools for AsyncAppender --> - <dependency> - <groupId>org.jctools</groupId> - <artifactId>jctools-core</artifactId> - <optional>true</optional> - </dependency> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter-engine</artifactId> diff --git a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/AsyncAppenderTest.java b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/AsyncAppenderTest.java index b1aacc3e41..9631d9a2e0 100644 --- a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/AsyncAppenderTest.java +++ b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/AsyncAppenderTest.java @@ -118,14 +118,6 @@ public class AsyncAppenderTest { assertEquals("STDOUT", appender.getErrorRef()); } - @Test - @Tag("jctools") - @LoggerContextSource("BlockingQueueFactory-JCToolsBlockingQueue.xml") - public void testJcToolsBlockingQueue(final LoggerContext context) throws InterruptedException { - rewriteTest(context); - exceptionTest(context); - } - @Test @LoggerContextSource("BlockingQueueFactory-LinkedTransferQueue.xml") public void testLinkedTransferQueue(final LoggerContext context) throws InterruptedException { diff --git a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/async/perftest/RunJCTools.java b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/async/perftest/RunJCTools.java deleted file mode 100644 index 58622a938a..0000000000 --- a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/async/perftest/RunJCTools.java +++ /dev/null @@ -1,29 +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.async.perftest; - -import java.util.concurrent.BlockingQueue; -import org.apache.logging.log4j.core.async.JCToolsBlockingQueueFactory; -import org.apache.logging.log4j.core.async.JCToolsBlockingQueueFactory.WaitStrategy; - -public class RunJCTools extends AbstractRunQueue { - - @Override - BlockingQueue<String> createQueue(final int capacity) { - return JCToolsBlockingQueueFactory.createFactory(WaitStrategy.SPIN).create(capacity); - } -} diff --git a/log4j-core/pom.xml b/log4j-core/pom.xml index fcdfffd644..bc33f87910 100644 --- a/log4j-core/pom.xml +++ b/log4j-core/pom.xml @@ -40,7 +40,6 @@ com.lmax.disruptor.*;resolution:=optional, org.apache.commons.compress.*;resolution:=optional, org.fusesource.jansi;resolution:=optional, - org.jctools.*;resolution:=optional, <!-- Optional Java modules --> <!-- java.management --> java.lang.management;resolution:=optional, @@ -134,12 +133,6 @@ <artifactId>jansi</artifactId> <optional>true</optional> </dependency> - <!-- Alternative implementation of BlockingQueue using JCTools for AsyncAppender --> - <dependency> - <groupId>org.jctools</groupId> - <artifactId>jctools-core</artifactId> - <optional>true</optional> - </dependency> </dependencies> <build> <plugins> diff --git a/log4j-gctests/pom.xml b/log4j-gctests/pom.xml index a461b5fff7..988808c891 100644 --- a/log4j-gctests/pom.xml +++ b/log4j-gctests/pom.xml @@ -99,12 +99,6 @@ <artifactId>jansi</artifactId> <optional>true</optional> </dependency> - <!-- Alternative implementation of BlockingQueue using JCTools for AsyncAppender --> - <dependency> - <groupId>org.jctools</groupId> - <artifactId>jctools-core</artifactId> - <optional>true</optional> - </dependency> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter-engine</artifactId> diff --git a/log4j-jctools/pom.xml b/log4j-jctools/pom.xml index a66acc8017..e5e8c01b76 100644 --- a/log4j-jctools/pom.xml +++ b/log4j-jctools/pom.xml @@ -53,6 +53,12 @@ <artifactId>jctools-core</artifactId> </dependency> + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core-test</artifactId> + <scope>test</scope> + </dependency> + <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter-engine</artifactId> diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/async/JCToolsBlockingQueueFactory.java b/log4j-jctools/src/main/java/org/apache/logging/log4j/jctools/JCToolsBlockingQueueFactory.java similarity index 95% rename from log4j-core/src/main/java/org/apache/logging/log4j/core/async/JCToolsBlockingQueueFactory.java rename to log4j-jctools/src/main/java/org/apache/logging/log4j/jctools/JCToolsBlockingQueueFactory.java index 188d49bb5b..d35801cdd6 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/async/JCToolsBlockingQueueFactory.java +++ b/log4j-jctools/src/main/java/org/apache/logging/log4j/jctools/JCToolsBlockingQueueFactory.java @@ -14,12 +14,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.logging.log4j.core.async; +package org.apache.logging.log4j.jctools; import java.util.Collection; import java.util.concurrent.BlockingQueue; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.LockSupport; +import org.apache.logging.log4j.core.async.BlockingQueueFactory; import org.apache.logging.log4j.plugins.Configurable; import org.apache.logging.log4j.plugins.Plugin; import org.apache.logging.log4j.plugins.PluginAttribute; @@ -27,13 +28,13 @@ import org.apache.logging.log4j.plugins.PluginFactory; import org.jctools.queues.MpscArrayQueue; /** - * Factory for creating instances of BlockingQueues backed by JCTools {@link MpscArrayQueue}. + * A {@link BlockingQueueFactory} based on <a href="https://jctools.github.io/JCTools/">JCTools</a>. * - * @since 2.7 + * @since 3.0.0 */ @Configurable(elementType = BlockingQueueFactory.ELEMENT_TYPE, printObject = true) @Plugin("JCToolsBlockingQueue") -public class JCToolsBlockingQueueFactory implements BlockingQueueFactory { +public final class JCToolsBlockingQueueFactory implements BlockingQueueFactory { private final WaitStrategy waitStrategy; diff --git a/log4j-jctools/src/main/java/org/apache/logging/log4j/jctools/JCToolsMpmcRecyclerFactoryProvider.java b/log4j-jctools/src/main/java/org/apache/logging/log4j/jctools/JCToolsRecyclerFactoryProvider.java similarity index 85% rename from log4j-jctools/src/main/java/org/apache/logging/log4j/jctools/JCToolsMpmcRecyclerFactoryProvider.java rename to log4j-jctools/src/main/java/org/apache/logging/log4j/jctools/JCToolsRecyclerFactoryProvider.java index 3a8fe11305..321b7e9983 100644 --- a/log4j-jctools/src/main/java/org/apache/logging/log4j/jctools/JCToolsMpmcRecyclerFactoryProvider.java +++ b/log4j-jctools/src/main/java/org/apache/logging/log4j/jctools/JCToolsRecyclerFactoryProvider.java @@ -32,10 +32,12 @@ import org.apache.logging.log4j.util.PropertyEnvironment; import org.jctools.queues.MpmcArrayQueue; /** - * A multi-producer-multi-consumer, thread-safe {@link Recycler} factory provider implementation based on <a href="https://jctools.github.io/JCTools/">JCTools</a>. + * A {@link Recycler} factory provider implementation based on <a href="https://jctools.github.io/JCTools/">JCTools</a>. + * + * @since 3.0.0 */ @ServiceProvider(RecyclerFactoryProvider.class) -public final class JCToolsMpmcRecyclerFactoryProvider implements RecyclerFactoryProvider { +public final class JCToolsRecyclerFactoryProvider implements RecyclerFactoryProvider { @Override public int getOrder() { @@ -57,10 +59,8 @@ public final class JCToolsMpmcRecyclerFactoryProvider implements RecyclerFactory return new JCToolsMpmcRecyclerFactory(capacity); } - // Visible for testing - static final class JCToolsMpmcRecyclerFactory implements RecyclerFactory { + private static final class JCToolsMpmcRecyclerFactory implements RecyclerFactory { - // Visible for testing private final int capacity; private JCToolsMpmcRecyclerFactory(final int capacity) { @@ -75,13 +75,11 @@ public final class JCToolsMpmcRecyclerFactoryProvider implements RecyclerFactory return new JCToolsMpmcRecycler<>(supplier, cleaner, queue); } - // Visible for testing - static final class JCToolsMpmcRecycler<V> extends AbstractRecycler<V> { + private static final class JCToolsMpmcRecycler<V> extends AbstractRecycler<V> { private final Consumer<V> cleaner; - // Visible for testing - final Queue<V> queue; + private final Queue<V> queue; private JCToolsMpmcRecycler(final Supplier<V> supplier, final Consumer<V> cleaner, final Queue<V> queue) { super(supplier); diff --git a/log4j-jctools/src/test/java/org/apache/logging/log4j/jctools/JCToolsBlockingQueueFactoryTest.java b/log4j-jctools/src/test/java/org/apache/logging/log4j/jctools/JCToolsBlockingQueueFactoryTest.java new file mode 100644 index 0000000000..03e96f05ba --- /dev/null +++ b/log4j-jctools/src/test/java/org/apache/logging/log4j/jctools/JCToolsBlockingQueueFactoryTest.java @@ -0,0 +1,76 @@ +/* + * 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.jctools; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.util.List; +import java.util.concurrent.TimeUnit; +import org.apache.logging.log4j.LoggingException; +import org.apache.logging.log4j.core.LoggerContext; +import org.apache.logging.log4j.core.appender.AsyncAppender; +import org.apache.logging.log4j.core.test.appender.ListAppender; +import org.apache.logging.log4j.core.test.junit.LoggerContextSource; +import org.apache.logging.log4j.spi.ExtendedLogger; +import org.junit.jupiter.api.Test; + +class JCToolsBlockingQueueFactoryTest { + + private static void exceptionTest(final LoggerContext context) throws InterruptedException { + final ExtendedLogger logger = context.getLogger(AsyncAppender.class); + final Exception parent = new IllegalStateException("Test"); + final Throwable child = new LoggingException("This is a test", parent); + logger.error("This is a test", child); + final ListAppender appender = context.getConfiguration().getAppender("List"); + final List<String> messages; + try { + messages = appender.getMessages(1, 2, TimeUnit.SECONDS); + } finally { + appender.clear(); + } + assertNotNull(messages); + assertEquals(1, messages.size()); + assertTrue(messages.get(0).contains(parent.getClass().getName())); + } + + private static void rewriteTest(final LoggerContext context) throws InterruptedException { + final ExtendedLogger logger = context.getLogger(AsyncAppender.class); + logger.error("This is a test"); + logger.warn("Hello world!"); + final ListAppender appender = context.getConfiguration().getAppender("List"); + final List<String> messages; + try { + messages = appender.getMessages(2, 2, TimeUnit.SECONDS); + } finally { + appender.clear(); + } + assertNotNull(messages); + assertEquals(2, messages.size()); + final String messagePrefix = JCToolsBlockingQueueFactoryTest.class.getName() + " rewriteTest "; + assertEquals(messagePrefix + "This is a test", messages.get(0)); + assertEquals(messagePrefix + "Hello world!", messages.get(1)); + } + + @Test + @LoggerContextSource("JCToolsBlockingQueueFactoryTest.xml") + public void testJcToolsBlockingQueue(final LoggerContext context) throws InterruptedException { + rewriteTest(context); + exceptionTest(context); + } +} diff --git a/log4j-jctools/src/test/java/org/apache/logging/log4j/jctools/JCToolsMpmcRecyclerFactoryProviderTest.java b/log4j-jctools/src/test/java/org/apache/logging/log4j/jctools/JCToolsRecyclerFactoryProviderTest.java similarity index 91% rename from log4j-jctools/src/test/java/org/apache/logging/log4j/jctools/JCToolsMpmcRecyclerFactoryProviderTest.java rename to log4j-jctools/src/test/java/org/apache/logging/log4j/jctools/JCToolsRecyclerFactoryProviderTest.java index b936c14309..51e9d9e272 100644 --- a/log4j-jctools/src/test/java/org/apache/logging/log4j/jctools/JCToolsMpmcRecyclerFactoryProviderTest.java +++ b/log4j-jctools/src/test/java/org/apache/logging/log4j/jctools/JCToolsRecyclerFactoryProviderTest.java @@ -24,7 +24,7 @@ import org.apache.logging.log4j.spi.recycler.RecyclerFactoryProvider; import org.apache.logging.log4j.spi.recycler.RecyclerFactoryRegistry; import org.junit.jupiter.api.Test; -class JCToolsMpmcRecyclerFactoryProviderTest { +class JCToolsRecyclerFactoryProviderTest { @Test void verify_is_the_first() { @@ -32,6 +32,6 @@ class JCToolsMpmcRecyclerFactoryProviderTest { .sorted(Comparator.comparing(RecyclerFactoryProvider::getOrder)) .<Class<?>>map(RecyclerFactoryProvider::getClass) .toList(); - assertThat(providerClasses).startsWith(JCToolsMpmcRecyclerFactoryProvider.class); + assertThat(providerClasses).startsWith(JCToolsRecyclerFactoryProvider.class); } } diff --git a/log4j-core-test/src/test/resources/BlockingQueueFactory-JCToolsBlockingQueue.xml b/log4j-jctools/src/test/resources/JCToolsBlockingQueueFactoryTest.xml similarity index 95% rename from log4j-core-test/src/test/resources/BlockingQueueFactory-JCToolsBlockingQueue.xml rename to log4j-jctools/src/test/resources/JCToolsBlockingQueueFactoryTest.xml index c53500891b..1b6ff95acb 100644 --- a/log4j-core-test/src/test/resources/BlockingQueueFactory-JCToolsBlockingQueue.xml +++ b/log4j-jctools/src/test/resources/JCToolsBlockingQueueFactoryTest.xml @@ -15,7 +15,7 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> -<Configuration status="OFF" name="JCToolsBlockingQueueFactory"> +<Configuration status="OFF" name="JCToolsBlockingQueueFactoryTest"> <Appenders> <Console name="STDOUT"> diff --git a/log4j-jctools/src/test/resources/META-INF/services/org.apache.logging.log4j.spi.recycler.RecyclerFactoryProvider b/log4j-jctools/src/test/resources/META-INF/services/org.apache.logging.log4j.spi.recycler.RecyclerFactoryProvider index 36741a8bb5..25c8b92149 100644 --- a/log4j-jctools/src/test/resources/META-INF/services/org.apache.logging.log4j.spi.recycler.RecyclerFactoryProvider +++ b/log4j-jctools/src/test/resources/META-INF/services/org.apache.logging.log4j.spi.recycler.RecyclerFactoryProvider @@ -3,4 +3,4 @@ # As a result, tests of the same artifact (running against `target/` contents, not the JAR) don't have them. # To mitigate this, we manually create this file here only for tests. # `logging-parent` version `10.5.0` will switch from `bnd:jar` to `bnd:bnd-process`, then this hack won't be needed. -org.apache.logging.log4j.jctools.JCToolsMpmcRecyclerFactoryProvider +org.apache.logging.log4j.jctools.JCToolsRecyclerFactoryProvider diff --git a/log4j-layout-template-json-test/pom.xml b/log4j-layout-template-json-test/pom.xml index 7a24826ad0..f0945107da 100644 --- a/log4j-layout-template-json-test/pom.xml +++ b/log4j-layout-template-json-test/pom.xml @@ -78,12 +78,6 @@ <artifactId>java-allocation-instrumenter</artifactId> <scope>test</scope> </dependency> - <!-- needed for `RecyclerFactoriesTest` --> - <dependency> - <groupId>org.jctools</groupId> - <artifactId>jctools-core</artifactId> - <scope>test</scope> - </dependency> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter-engine</artifactId> diff --git a/log4j-layout-template-json-test/src/test/resources/recyclerFactoryCustomizedJsonTemplateLayoutLogging.xml b/log4j-layout-template-json-test/src/test/resources/recyclerFactoryCustomizedJsonTemplateLayoutLogging.xml deleted file mode 100644 index 63936384cc..0000000000 --- a/log4j-layout-template-json-test/src/test/resources/recyclerFactoryCustomizedJsonTemplateLayoutLogging.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ 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. - --> -<Configuration status="OFF"> - <Appenders> - <List name="List" raw="true"> - <JsonTemplateLayout - recyclerFactory="queue:supplier=org.jctools.queues.MpmcArrayQueue.new,capacity=512"/> - </List> - </Appenders> - <Loggers> - <Root level="TRACE"> - <AppenderRef ref="List"/> - </Root> - </Loggers> -</Configuration> diff --git a/log4j-layout-template-json/pom.xml b/log4j-layout-template-json/pom.xml index 651512771e..6279900cd6 100644 --- a/log4j-layout-template-json/pom.xml +++ b/log4j-layout-template-json/pom.xml @@ -52,11 +52,6 @@ <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-plugins</artifactId> </dependency> - <dependency> - <groupId>org.jctools</groupId> - <artifactId>jctools-core</artifactId> - <optional>true</optional> - </dependency> </dependencies> <build> diff --git a/pom.xml b/pom.xml index 2344d4c60f..92041a027c 100644 --- a/pom.xml +++ b/pom.xml @@ -357,12 +357,6 @@ <version>${project.version}</version> </dependency> - <dependency> - <groupId>org.apache.logging.log4j</groupId> - <artifactId>log4j-api-queue-jctools</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-api-test</artifactId> @@ -417,6 +411,12 @@ <version>${project.version}</version> </dependency> + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-jctools</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-jdbc</artifactId> diff --git a/src/site/asciidoc/manual/appenders.adoc b/src/site/asciidoc/manual/appenders.adoc index c2127cf344..5256b8adab 100644 --- a/src/site/asciidoc/manual/appenders.adoc +++ b/src/site/asciidoc/manual/appenders.adoc @@ -192,6 +192,7 @@ attribute, `spinPolicy`, which corresponds to the `SpinPolicy` enum. |JCToolsBlockingQueue |This uses https://jctools.github.io/JCTools/[JCTools], specifically the MPSC bounded lock-free queue. +This implementation is provided by the `log4j-jctools` artifact. |LinkedTransferQueue |This uses the new in Java 7 implementation https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/LinkedTransferQueue.html[`LinkedTransferQueue`]. diff --git a/src/site/asciidoc/runtime-dependencies.adoc b/src/site/asciidoc/runtime-dependencies.adoc index e46761edc7..e98983a2a6 100644 --- a/src/site/asciidoc/runtime-dependencies.adoc +++ b/src/site/asciidoc/runtime-dependencies.adoc @@ -182,8 +182,6 @@ The module info definition may be modified in the future to export these only to ! !requires static com.lmax.disruptor ! -!requires static org.jctools.core -! !requires static org.osgi.framework ! !requires static com.conversantmedia.disruptor @@ -312,8 +310,6 @@ The module info definition may be modified in the future to export these only to ! !requires org.apache.logging.log4j.core ! -!requires org.jctools.core -! !=== |log4j-plugin-processor
