> ignores = new ConcurrentHashSet<>();
diff --git a/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/ByteUtilTest.java b/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/ByteUtilTest.java
index efa686c174..2754994b8c 100644
--- a/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/ByteUtilTest.java
+++ b/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/ByteUtilTest.java
@@ -29,6 +29,7 @@ import io.netty.buffer.Unpooled;
import io.netty.util.internal.PlatformDependent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
import org.junit.Assert;
import org.junit.Assume;
import org.junit.Test;
@@ -40,7 +41,7 @@ import static org.junit.Assert.fail;
public class ByteUtilTest {
- private static final Logger log = LoggerFactory.getLogger(ByteUtilTest.class);
+ private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@Test
public void testBytesToString() {
diff --git a/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/DefaultSensitiveStringCodecTest.java b/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/DefaultSensitiveStringCodecTest.java
index e9993c15f2..6eadadd9cb 100644
--- a/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/DefaultSensitiveStringCodecTest.java
+++ b/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/DefaultSensitiveStringCodecTest.java
@@ -18,6 +18,7 @@ package org.apache.activemq.artemis.utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
import org.junit.Test;
import java.util.HashMap;
@@ -30,7 +31,7 @@ import static org.junit.Assert.fail;
public class DefaultSensitiveStringCodecTest {
- private static final Logger log = LoggerFactory.getLogger(DefaultSensitiveStringCodecTest.class);
+ private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@Test
public void testDefaultAlgorithm() throws Exception {
diff --git a/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/actors/OrderedExecutorSanityTest.java b/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/actors/OrderedExecutorSanityTest.java
index 7d7826956a..c269298426 100644
--- a/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/actors/OrderedExecutorSanityTest.java
+++ b/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/actors/OrderedExecutorSanityTest.java
@@ -28,11 +28,12 @@ import java.util.concurrent.atomic.AtomicInteger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
import org.junit.Assert;
import org.junit.Test;
public class OrderedExecutorSanityTest {
- private static final Logger log = LoggerFactory.getLogger(OrderedExecutorSanityTest.class);
+ private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@Test
public void shouldExecuteTasksInOrder() throws InterruptedException {
diff --git a/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/critical/MultiThreadCriticalMeasureTest.java b/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/critical/MultiThreadCriticalMeasureTest.java
index 591afd494f..6603f581e7 100644
--- a/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/critical/MultiThreadCriticalMeasureTest.java
+++ b/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/critical/MultiThreadCriticalMeasureTest.java
@@ -29,12 +29,13 @@ import org.apache.activemq.artemis.utils.ReusableLatch;
import org.apache.activemq.artemis.utils.Wait;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
import org.junit.Assert;
import org.junit.Test;
public class MultiThreadCriticalMeasureTest {
- private static final Logger logger = LoggerFactory.getLogger(MultiThreadCriticalMeasureTest.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@Test
public void testMultiThread() throws Throwable {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java
index dc9b20427d..41eedc73a2 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java
@@ -25,13 +25,14 @@ import org.apache.activemq.artemis.core.server.ComponentConfigurationRoutingType
import org.apache.activemq.artemis.utils.critical.CriticalAnalyzerPolicy;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
/**
* Default values of ActiveMQ Artemis configuration parameters.
*/
public final class ActiveMQDefaultConfiguration {
- private static final Logger logger = LoggerFactory.getLogger(ActiveMQDefaultConfiguration.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
/*
* In order to avoid compile time in-lining of constants, all access is done through methods
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/ChannelBroadcastEndpointFactory.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/ChannelBroadcastEndpointFactory.java
index 15acbcee55..56e3ddfe6f 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/ChannelBroadcastEndpointFactory.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/ChannelBroadcastEndpointFactory.java
@@ -19,6 +19,7 @@ package org.apache.activemq.artemis.api.core;
import org.apache.activemq.artemis.api.core.jgroups.JChannelManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
import org.jgroups.JChannel;
/**
@@ -28,7 +29,7 @@ import org.jgroups.JChannel;
*/
public class ChannelBroadcastEndpointFactory implements BroadcastEndpointFactory {
- private static final Logger logger = LoggerFactory.getLogger(ChannelBroadcastEndpointFactory.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private final JChannel channel;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsBroadcastEndpoint.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsBroadcastEndpoint.java
index 68b549c41f..af9c9747de 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsBroadcastEndpoint.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsBroadcastEndpoint.java
@@ -23,6 +23,7 @@ import org.apache.activemq.artemis.api.core.jgroups.JChannelWrapper;
import org.apache.activemq.artemis.api.core.jgroups.JGroupsReceiver;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
import org.jgroups.JChannel;
/**
@@ -30,7 +31,7 @@ import org.jgroups.JChannel;
*/
public abstract class JGroupsBroadcastEndpoint implements BroadcastEndpoint {
- private static final Logger logger = LoggerFactory.getLogger(JGroupsBroadcastEndpoint.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private final String channelName;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JChannelManager.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JChannelManager.java
index 4e72dda303..9d4195fb1b 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JChannelManager.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JChannelManager.java
@@ -23,6 +23,7 @@ import java.util.Map;
import org.apache.activemq.artemis.api.core.JGroupsBroadcastEndpoint;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
/**
* This class maintain a global Map of JChannels wrapped in JChannelWrapper for
@@ -33,6 +34,8 @@ import org.slf4j.LoggerFactory;
*/
public class JChannelManager {
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
private static final JChannelManager theInstance = new JChannelManager();
public static JChannelManager getInstance() {
@@ -55,8 +58,6 @@ public class JChannelManager {
// this is useful for testcases using a single channel.
private boolean loopbackMessages = false;
- private final Logger logger = LoggerFactory.getLogger(JChannelManager.class);
-
private static final Map channels = new HashMap<>();
public boolean isLoopbackMessages() {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JChannelWrapper.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JChannelWrapper.java
index d57bfd306f..e93dbe7da0 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JChannelWrapper.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JChannelWrapper.java
@@ -25,6 +25,7 @@ import org.jgroups.Message;
import org.jgroups.Receiver;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
/**
* This class wraps a JChannel with a reference counter. The reference counter
@@ -33,7 +34,7 @@ import org.slf4j.LoggerFactory;
*/
public class JChannelWrapper {
- private static final Logger logger = LoggerFactory.getLogger(JChannelWrapper.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private boolean connected = false;
int refCount = 1;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JGroupsReceiver.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JGroupsReceiver.java
index 5f5d608ce5..3c1a22a0b3 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JGroupsReceiver.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JGroupsReceiver.java
@@ -23,6 +23,7 @@ import java.util.concurrent.TimeUnit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
import org.jgroups.Receiver;
/**
@@ -31,7 +32,7 @@ import org.jgroups.Receiver;
*/
public class JGroupsReceiver implements Receiver {
- private static final Logger logger = LoggerFactory.getLogger(JGroupsReceiver.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private final BlockingQueue dequeue = new LinkedBlockingDeque<>();
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/AbstractProducerCreditsImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/AbstractProducerCreditsImpl.java
index bb89361763..12d3e3ebdc 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/AbstractProducerCreditsImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/AbstractProducerCreditsImpl.java
@@ -23,10 +23,11 @@ import org.apache.activemq.artemis.api.core.SimpleString;
import org.apache.activemq.artemis.spi.core.remoting.SessionContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
public abstract class AbstractProducerCreditsImpl implements ClientProducerCredits {
- private static final Logger logger = LoggerFactory.getLogger(AbstractProducerCreditsImpl.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
protected int pendingCredits;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/AsynchronousProducerCreditsImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/AsynchronousProducerCreditsImpl.java
index d62d892b49..a6a61d38a1 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/AsynchronousProducerCreditsImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/AsynchronousProducerCreditsImpl.java
@@ -20,10 +20,11 @@ package org.apache.activemq.artemis.core.client.impl;
import org.apache.activemq.artemis.api.core.SimpleString;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
public class AsynchronousProducerCreditsImpl extends AbstractProducerCreditsImpl {
- private static final Logger logger = LoggerFactory.getLogger(AsynchronousProducerCreditsImpl.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
int balance;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientConsumerImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientConsumerImpl.java
index 87c8281322..f27ce80390 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientConsumerImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientConsumerImpl.java
@@ -47,11 +47,12 @@ import org.apache.activemq.artemis.utils.collections.PriorityLinkedList;
import org.apache.activemq.artemis.utils.collections.PriorityLinkedListImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
public final class ClientConsumerImpl implements ClientConsumerInternal {
- private static final Logger logger = LoggerFactory.getLogger(ClientConsumerImpl.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private static final long CLOSE_TIMEOUT_MILLISECONDS = 10000;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerImpl.java
index 9d746fc19c..d18c0916e8 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerImpl.java
@@ -35,13 +35,14 @@ import org.apache.activemq.artemis.utils.TokenBucketLimiter;
import org.apache.activemq.artemis.utils.UUIDGenerator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
/**
* The client-side Producer.
*/
public class ClientProducerImpl implements ClientProducerInternal {
- private static final Logger logger = LoggerFactory.getLogger(ClientProducerImpl.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private final SimpleString address;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java
index b12e51d198..35484b7bb5 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java
@@ -72,10 +72,11 @@ import org.apache.activemq.artemis.utils.actors.OrderedExecutorFactory;
import org.apache.activemq.artemis.utils.collections.ConcurrentHashSet;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, ClientConnectionLifeCycleListener {
- private static final Logger logger = LoggerFactory.getLogger(ClientSessionFactoryImpl.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private final ServerLocatorInternal serverLocator;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java
index fa65b2e003..09c0fa75dc 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java
@@ -60,10 +60,11 @@ import org.apache.activemq.artemis.utils.UUIDGenerator;
import org.apache.activemq.artemis.utils.XidCodecSupport;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
public final class ClientSessionImpl implements ClientSessionInternal, FailureListener {
- private static final Logger logger = LoggerFactory.getLogger(ClientSessionImpl.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private final Map metadata = new HashMap<>();
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ServerLocatorImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ServerLocatorImpl.java
index 4554357252..03e6b533fe 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ServerLocatorImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ServerLocatorImpl.java
@@ -75,6 +75,7 @@ import org.apache.activemq.artemis.utils.actors.OrderedExecutor;
import org.apache.activemq.artemis.utils.uri.FluentPropertyBeanIntrospectorWithIgnores;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
/**
* This is the implementation of {@link org.apache.activemq.artemis.api.core.client.ServerLocator} and all
@@ -82,7 +83,7 @@ import org.slf4j.LoggerFactory;
*/
public final class ServerLocatorImpl implements ServerLocatorInternal, DiscoveryListener {
- private static final Logger logger = LoggerFactory.getLogger(ServerLocatorImpl.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private enum STATE {
INITIALIZED, CLOSED, CLOSING
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/Topology.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/Topology.java
index 1255b4b07c..032704db9d 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/Topology.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/Topology.java
@@ -33,10 +33,11 @@ import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
import org.apache.activemq.artemis.spi.core.remoting.Connector;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
public final class Topology {
- private static final Logger logger = LoggerFactory.getLogger(Topology.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private final Set topologyListeners;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/cluster/DiscoveryGroup.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/cluster/DiscoveryGroup.java
index 45d3f97b01..e0342a4b4b 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/cluster/DiscoveryGroup.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/cluster/DiscoveryGroup.java
@@ -42,6 +42,7 @@ import org.apache.activemq.artemis.utils.ActiveMQThreadFactory;
import org.apache.activemq.artemis.utils.collections.TypedProperties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
/**
* This class is used to search for members on the cluster through the opaque interface {@link BroadcastEndpoint}.
@@ -53,7 +54,7 @@ import org.slf4j.LoggerFactory;
*/
public final class DiscoveryGroup implements ActiveMQComponent {
- private static final Logger logger = LoggerFactory.getLogger(DiscoveryGroup.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private final List listeners = new ArrayList<>();
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java
index f4b35526fd..9a7c8c5008 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java
@@ -60,6 +60,7 @@ import org.apache.activemq.artemis.utils.UUID;
import org.apache.activemq.artemis.utils.collections.TypedProperties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
import static org.apache.activemq.artemis.utils.ByteUtil.ensureExactWritable;
@@ -71,7 +72,7 @@ public class CoreMessage extends RefCountMessage implements ICoreMessage {
protected volatile int memoryEstimate = -1;
- private static final Logger logger = LoggerFactory.getLogger(CoreMessage.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
// There's an integer with the number of bytes for the body
public static final int BODY_OFFSET = DataConstants.SIZE_INT;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/openmbean/MessageOpenTypeFactory.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/openmbean/MessageOpenTypeFactory.java
index 33a9efb17f..41bd83b7fb 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/openmbean/MessageOpenTypeFactory.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/openmbean/MessageOpenTypeFactory.java
@@ -36,10 +36,11 @@ import org.apache.activemq.artemis.api.core.Message;
import org.apache.activemq.artemis.api.core.SimpleString;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
public class MessageOpenTypeFactory {
- private static final Logger logger = LoggerFactory.getLogger(MessageOpenTypeFactory.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
public MessageOpenTypeFactory() {
try {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQClientProtocolManager.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQClientProtocolManager.java
index 0f503f95b2..0e375d4c6e 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQClientProtocolManager.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQClientProtocolManager.java
@@ -65,6 +65,7 @@ import org.apache.activemq.artemis.spi.core.remoting.TopologyResponseHandler;
import org.apache.activemq.artemis.utils.VersionLoader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
/**
* This class will return specific packets for different types of actions happening on a messaging protocol.
@@ -80,7 +81,7 @@ import org.slf4j.LoggerFactory;
public class ActiveMQClientProtocolManager implements ClientProtocolManager {
- private static final Logger logger = LoggerFactory.getLogger(ActiveMQClientProtocolManager.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private static final String handshake = "ARTEMIS";
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQSessionContext.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQSessionContext.java
index fa20909ab1..f5bf232a96 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQSessionContext.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQSessionContext.java
@@ -131,10 +131,11 @@ import org.apache.activemq.artemis.spi.core.remoting.SessionContext;
import org.apache.activemq.artemis.utils.TokenBucketLimiterImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
public class ActiveMQSessionContext extends SessionContext {
- private static final Logger logger = LoggerFactory.getLogger(ActiveMQSessionContext.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private final Channel sessionChannel;
private final int serverVersion;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java
index 3edd9beee6..d89d3f6b1c 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java
@@ -44,10 +44,11 @@ import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
import org.apache.activemq.artemis.utils.ConcurrentUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
public final class ChannelImpl implements Channel {
- private static final Logger logger = LoggerFactory.getLogger(ChannelImpl.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
public enum CHANNEL_ID {
/**
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/RemotingConnectionImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/RemotingConnectionImpl.java
index c5ebe6733f..6065dd561f 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/RemotingConnectionImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/RemotingConnectionImpl.java
@@ -48,10 +48,11 @@ import org.apache.activemq.artemis.spi.core.remoting.Connection;
import org.apache.activemq.artemis.utils.SimpleIDGenerator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
public class RemotingConnectionImpl extends AbstractRemotingConnection implements CoreRemotingConnection {
- private static final Logger logger = LoggerFactory.getLogger(RemotingConnectionImpl.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private final PacketDecoder packetDecoder;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/CertificateUtil.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/CertificateUtil.java
index a066b06658..db90c409ff 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/CertificateUtil.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/CertificateUtil.java
@@ -32,10 +32,11 @@ import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
import org.apache.activemq.artemis.spi.core.remoting.Connection;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
public class CertificateUtil {
- private static final Logger logger = LoggerFactory.getLogger(CertificateUtil.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private static final String SSL_HANDLER_NAME = "ssl";
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/CheckDependencies.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/CheckDependencies.java
index 682af3c89b..2bbcd1883e 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/CheckDependencies.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/CheckDependencies.java
@@ -23,6 +23,7 @@ import org.apache.activemq.artemis.core.client.ActiveMQClientLogger;
import org.apache.activemq.artemis.utils.Env;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
/**
* This class will check for Epoll or KQueue is available, and return false in case of NoClassDefFoundError
@@ -30,7 +31,7 @@ import org.slf4j.LoggerFactory;
*/
public class CheckDependencies {
- private static final Logger logger = LoggerFactory.getLogger(CheckDependencies.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
public static final boolean isEpollAvailable() {
try {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnection.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnection.java
index 65ac5bdabd..b1ce0a4203 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnection.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnection.java
@@ -45,12 +45,13 @@ import org.apache.activemq.artemis.utils.Env;
import org.apache.activemq.artemis.utils.IPV6Util;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
import static org.apache.activemq.artemis.utils.Preconditions.checkNotNull;
public class NettyConnection implements Connection {
- private static final Logger logger = LoggerFactory.getLogger(NettyConnection.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private static final int DEFAULT_WAIT_MILLIS = 10_000;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java
index 45276bb767..130066a9de 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java
@@ -125,6 +125,7 @@ import org.apache.activemq.artemis.utils.FutureLatch;
import org.apache.activemq.artemis.utils.IPV6Util;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
import static org.apache.activemq.artemis.utils.Base64.encodeBytes;
@@ -134,7 +135,7 @@ public class NettyConnector extends AbstractConnector {
public static String EPOLL_CONNECTOR_TYPE = "EPOLL";
public static String KQUEUE_CONNECTOR_TYPE = "KQUEUE";
- private static final Logger logger = LoggerFactory.getLogger(NettyConnector.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
public static final String JAVAX_KEYSTORE_PATH_PROP_NAME = "javax.net.ssl.keyStore";
public static final String JAVAX_KEYSTORE_PASSWORD_PROP_NAME = "javax.net.ssl.keyStorePassword";
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/TransportConstants.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/TransportConstants.java
index 1fa5d512eb..9f6b590357 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/TransportConstants.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/TransportConstants.java
@@ -25,10 +25,11 @@ import io.netty.util.Version;
import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
public class TransportConstants {
- private static final Logger logger = LoggerFactory.getLogger(TransportConstants.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
public static final String SSL_CONTEXT_PROP_NAME = "sslContext";
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/DefaultOpenSSLContextFactory.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/DefaultOpenSSLContextFactory.java
index d5dd76fcb5..b40d43120f 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/DefaultOpenSSLContextFactory.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/DefaultOpenSSLContextFactory.java
@@ -16,6 +16,7 @@
*/
package org.apache.activemq.artemis.core.remoting.impl.ssl;
+import java.lang.invoke.MethodHandles;
import java.util.Map;
import io.netty.handler.ssl.SslContext;
@@ -23,12 +24,16 @@ import org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnector;
import org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants;
import org.apache.activemq.artemis.spi.core.remoting.ssl.OpenSSLContextFactory;
import org.apache.activemq.artemis.spi.core.remoting.ssl.SSLContextConfig;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Default {@link OpenSSLContextFactory} for use in {@link NettyConnector} and NettyAcceptor.
*/
public class DefaultOpenSSLContextFactory implements OpenSSLContextFactory {
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
/**
* @param additionalOpts not used by this implementation
*
@@ -36,7 +41,7 @@ public class DefaultOpenSSLContextFactory implements OpenSSLContextFactory {
*/
@Override
public SslContext getClientSslContext(final SSLContextConfig config, final Map additionalOpts) throws Exception {
- log.debug("Creating Client OpenSSL Context with {}", config);
+ logger.debug("Creating Client OpenSSL Context with {}", config);
return new SSLSupport(config)
.setSslProvider(TransportConstants.OPENSSL_PROVIDER)
.createNettyClientContext();
@@ -49,7 +54,7 @@ public class DefaultOpenSSLContextFactory implements OpenSSLContextFactory {
*/
@Override
public SslContext getServerSslContext(final SSLContextConfig config, final Map additionalOpts) throws Exception {
- log.debug("Creating Server OpenSSL Context with {}", config);
+ logger.debug("Creating Server OpenSSL Context with {}", config);
return new SSLSupport(config)
.setSslProvider(TransportConstants.OPENSSL_PROVIDER)
.createNettyContext();
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/DefaultSSLContextFactory.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/DefaultSSLContextFactory.java
index ab1a71f91e..c17b34d139 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/DefaultSSLContextFactory.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/DefaultSSLContextFactory.java
@@ -15,18 +15,23 @@
*/
package org.apache.activemq.artemis.core.remoting.impl.ssl;
+import java.lang.invoke.MethodHandles;
import java.util.Map;
import javax.net.ssl.SSLContext;
import org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants;
import org.apache.activemq.artemis.spi.core.remoting.ssl.SSLContextConfig;
import org.apache.activemq.artemis.spi.core.remoting.ssl.SSLContextFactory;
import org.apache.activemq.artemis.utils.ConfigurationHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Simple SSLContextFactory for use in NettyConnector and NettyAcceptor.
*/
public class DefaultSSLContextFactory implements SSLContextFactory {
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
@Override
public SSLContext getSSLContext(final SSLContextConfig config, final Map additionalOpts) throws Exception {
final boolean useDefaultSslContext = ConfigurationHelper.getBooleanProperty(
@@ -36,11 +41,11 @@ public class DefaultSSLContextFactory implements SSLContextFactory {
);
if (useDefaultSslContext) {
- log.debug("Using the Default JDK SSLContext.");
+ logger.debug("Using the Default JDK SSLContext.");
return SSLContext.getDefault();
}
- log.debug("Creating JDK SSLContext with {}", config);
+ logger.debug("Creating JDK SSLContext with {}", config);
return new SSLSupport(config).createContext();
}
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/protocol/AbstractRemotingConnection.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/protocol/AbstractRemotingConnection.java
index 91b2a3a82b..4351f77b05 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/protocol/AbstractRemotingConnection.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/protocol/AbstractRemotingConnection.java
@@ -35,12 +35,13 @@ import org.apache.activemq.artemis.spi.core.remoting.Connection;
import org.apache.activemq.artemis.spi.core.remoting.ReadyListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
import javax.security.auth.Subject;
public abstract class AbstractRemotingConnection implements RemotingConnection {
- private static final Logger logger = LoggerFactory.getLogger(AbstractRemotingConnection.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
protected final List failureListeners = new CopyOnWriteArrayList<>();
protected final List closeListeners = new CopyOnWriteArrayList<>();
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ssl/OpenSSLContextFactory.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ssl/OpenSSLContextFactory.java
index a6bb2e1284..867619350b 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ssl/OpenSSLContextFactory.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ssl/OpenSSLContextFactory.java
@@ -19,8 +19,6 @@ package org.apache.activemq.artemis.spi.core.remoting.ssl;
import java.util.Map;
import io.netty.handler.ssl.SslContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
/**
* Service interface to create an {@link SslContext} for a configuration.
@@ -31,8 +29,6 @@ import org.slf4j.LoggerFactory;
*/
public interface OpenSSLContextFactory extends Comparable {
- Logger log = LoggerFactory.getLogger(OpenSSLContextFactory.class);
-
/**
* Release any cached {@link SslContext} instances.
*/
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ssl/SSLContextFactory.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ssl/SSLContextFactory.java
index 3334a4fd2c..8d737d02af 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ssl/SSLContextFactory.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ssl/SSLContextFactory.java
@@ -17,8 +17,6 @@ package org.apache.activemq.artemis.spi.core.remoting.ssl;
import java.util.Map;
import javax.net.ssl.SSLContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
/**
* Service interface to create a SSLContext for a configuration.
@@ -28,7 +26,6 @@ import org.slf4j.LoggerFactory;
* in your jar and fill it with the full qualified name of your implementation.
*/
public interface SSLContextFactory extends Comparable {
- Logger log = LoggerFactory.getLogger(SSLContextFactory.class);
/**
* @return an {@link SSLContext} for the given configuration.
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/AutoCreateUtil.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/AutoCreateUtil.java
index d0d8bde191..7e9375e81b 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/AutoCreateUtil.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/AutoCreateUtil.java
@@ -27,13 +27,14 @@ import org.apache.activemq.artemis.api.core.client.ClientSession.AddressQuery;
import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
/**
* Utility class to create queues 'automatically'.
*/
public class AutoCreateUtil {
- private static final Logger logger = LoggerFactory.getLogger(AutoCreateUtil.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
public static void autoCreateQueue(ClientSession session, SimpleString destAddress, SimpleString selectorString) throws ActiveMQException {
AddressQuery response = session.addressQuery(destAddress);
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/XMLUtil.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/XMLUtil.java
index e14dced4d6..707ee88127 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/XMLUtil.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/XMLUtil.java
@@ -37,6 +37,7 @@ import org.apache.activemq.artemis.core.client.ActiveMQClientLogger;
import org.apache.activemq.artemis.core.client.ActiveMQClientMessageBundle;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
@@ -47,7 +48,7 @@ import org.xml.sax.SAXException;
public final class XMLUtil {
- private static final Logger logger = LoggerFactory.getLogger(XMLUtil.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private XMLUtil() {
// Utility class
diff --git a/artemis-core-client/src/test/java/org/apache/activemq/artemis/tests/uri/ConnectorTransportConfigurationParserURITest.java b/artemis-core-client/src/test/java/org/apache/activemq/artemis/tests/uri/ConnectorTransportConfigurationParserURITest.java
index 991667fa80..15826a3f2c 100644
--- a/artemis-core-client/src/test/java/org/apache/activemq/artemis/tests/uri/ConnectorTransportConfigurationParserURITest.java
+++ b/artemis-core-client/src/test/java/org/apache/activemq/artemis/tests/uri/ConnectorTransportConfigurationParserURITest.java
@@ -23,12 +23,13 @@ import org.apache.activemq.artemis.api.core.TransportConfiguration;
import org.apache.activemq.artemis.uri.ConnectorTransportConfigurationParser;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
import org.junit.Assert;
import org.junit.Test;
public class ConnectorTransportConfigurationParserURITest {
- private static final Logger logger = LoggerFactory.getLogger(ConnectorTransportConfigurationParserURITest.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@Test
public void testParse() throws Exception {
diff --git a/artemis-hawtio/activemq-branding/src/main/java/org/apache/activemq/hawtio/branding/PluginContextListener.java b/artemis-hawtio/activemq-branding/src/main/java/org/apache/activemq/hawtio/branding/PluginContextListener.java
index 59b1dd791a..574f1015b8 100644
--- a/artemis-hawtio/activemq-branding/src/main/java/org/apache/activemq/hawtio/branding/PluginContextListener.java
+++ b/artemis-hawtio/activemq-branding/src/main/java/org/apache/activemq/hawtio/branding/PluginContextListener.java
@@ -19,6 +19,7 @@ package org.apache.activemq.hawtio.branding;
import io.hawt.web.plugin.HawtioPlugin;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
@@ -29,7 +30,7 @@ import javax.servlet.ServletContextListener;
**/
public class PluginContextListener implements ServletContextListener {
- private static final Logger LOG = LoggerFactory.getLogger(PluginContextListener.class);
+ private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
HawtioPlugin plugin = null;
diff --git a/artemis-hawtio/artemis-plugin/src/main/java/org/apache/activemq/hawtio/plugin/PluginContextListener.java b/artemis-hawtio/artemis-plugin/src/main/java/org/apache/activemq/hawtio/plugin/PluginContextListener.java
index a49b716fad..3c82c568cd 100644
--- a/artemis-hawtio/artemis-plugin/src/main/java/org/apache/activemq/hawtio/plugin/PluginContextListener.java
+++ b/artemis-hawtio/artemis-plugin/src/main/java/org/apache/activemq/hawtio/plugin/PluginContextListener.java
@@ -19,6 +19,7 @@ package org.apache.activemq.hawtio.plugin;
import io.hawt.web.plugin.HawtioPlugin;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
@@ -29,7 +30,7 @@ import javax.servlet.ServletContextListener;
**/
public class PluginContextListener implements ServletContextListener {
- private static final Logger LOG = LoggerFactory.getLogger(PluginContextListener.class);
+ private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
HawtioPlugin plugin = null;
diff --git a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/AbstractJDBCDriver.java b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/AbstractJDBCDriver.java
index 522fe36995..cd1600e1a2 100644
--- a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/AbstractJDBCDriver.java
+++ b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/AbstractJDBCDriver.java
@@ -27,6 +27,7 @@ import java.util.stream.Stream;
import org.apache.activemq.artemis.jdbc.store.sql.SQLProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
/**
* Class to hold common database functionality such as drivers and connections
@@ -34,7 +35,7 @@ import org.slf4j.LoggerFactory;
@SuppressWarnings("SynchronizeOnNonFinalField")
public abstract class AbstractJDBCDriver {
- private static final Logger logger = LoggerFactory.getLogger(AbstractJDBCDriver.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
protected SQLProvider sqlProvider;
diff --git a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/JDBCConnectionProvider.java b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/JDBCConnectionProvider.java
index a5237c1da7..afea96af49 100644
--- a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/JDBCConnectionProvider.java
+++ b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/JDBCConnectionProvider.java
@@ -27,10 +27,11 @@ import org.apache.activemq.artemis.jdbc.store.logging.LoggingConnection;
import org.apache.activemq.artemis.jdbc.store.sql.PropertySQLProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
public class JDBCConnectionProvider {
- private static final Logger logger = LoggerFactory.getLogger(JDBCConnectionProvider.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private DataSource dataSource;
private Executor networkTimeoutExecutor;
private int networkTimeoutMillis;
diff --git a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/JDBCUtils.java b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/JDBCUtils.java
index 9eeb13e72c..ff42e2b131 100644
--- a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/JDBCUtils.java
+++ b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/JDBCUtils.java
@@ -23,10 +23,11 @@ import org.apache.activemq.artemis.jdbc.store.sql.PropertySQLProvider;
import org.apache.activemq.artemis.jdbc.store.sql.SQLProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
public class JDBCUtils {
- private static final Logger logger = LoggerFactory.getLogger(JDBCUtils.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
public static SQLProvider.Factory getSQLProviderFactory(String url) {
PropertySQLProvider.Factory.SQLDialect dialect = PropertySQLProvider.Factory.identifyDialect(url);
diff --git a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFile.java b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFile.java
index 54255cf88e..ac0ca98fd6 100644
--- a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFile.java
+++ b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFile.java
@@ -36,10 +36,11 @@ import org.apache.activemq.artemis.core.journal.EncodingSupport;
import org.apache.activemq.artemis.core.journal.impl.SimpleWaitIOCallback;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
public class JDBCSequentialFile implements SequentialFile {
- private static final Logger logger = LoggerFactory.getLogger(JDBCSequentialFile.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private final String filename;
diff --git a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactory.java b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactory.java
index 0848e9b05b..8ac525f30d 100644
--- a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactory.java
+++ b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactory.java
@@ -35,10 +35,11 @@ import org.apache.activemq.artemis.jdbc.store.sql.SQLProvider;
import org.apache.activemq.artemis.utils.collections.ConcurrentHashSet;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
public class JDBCSequentialFileFactory implements SequentialFileFactory, ActiveMQComponent {
- private static final Logger logger = LoggerFactory.getLogger(JDBCSequentialFileFactory.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private boolean started;
diff --git a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactoryDriver.java b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactoryDriver.java
index 5f3f81d2a7..f1b9c2accd 100644
--- a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactoryDriver.java
+++ b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactoryDriver.java
@@ -31,11 +31,12 @@ import org.apache.activemq.artemis.jdbc.store.drivers.JDBCConnectionProvider;
import org.apache.activemq.artemis.jdbc.store.sql.SQLProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
@SuppressWarnings("SynchronizeOnNonFinalField")
public class JDBCSequentialFileFactoryDriver extends AbstractJDBCDriver {
- private static final Logger logger = LoggerFactory.getLogger(JDBCSequentialFileFactoryDriver.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
protected String deleteFile;
protected String createFile;
diff --git a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalImpl.java b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalImpl.java
index 90d7967e3f..6e9927141c 100644
--- a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalImpl.java
+++ b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalImpl.java
@@ -56,10 +56,11 @@ import org.apache.activemq.artemis.jdbc.store.sql.SQLProvider;
import org.apache.activemq.artemis.utils.collections.SparseArrayLinkedList;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
public class JDBCJournalImpl extends AbstractJDBCDriver implements Journal {
- private static final Logger logger = LoggerFactory.getLogger(JDBCJournalImpl.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
// Sync Delay in ms
//private static final int SYNC_DELAY = 5;
diff --git a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalRecord.java b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalRecord.java
index 37814f002f..167a967b30 100644
--- a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalRecord.java
+++ b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalRecord.java
@@ -34,10 +34,11 @@ import org.apache.activemq.artemis.core.journal.RecordInfo;
import org.apache.activemq.artemis.utils.ActiveMQBufferInputStream;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
class JDBCJournalRecord {
- private static final Logger logger = LoggerFactory.getLogger(JDBCJournalRecord.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
/*
Database Table Schema:
diff --git a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/sql/PropertySQLProvider.java b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/sql/PropertySQLProvider.java
index 183b68ceff..8b5d1e8763 100644
--- a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/sql/PropertySQLProvider.java
+++ b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/sql/PropertySQLProvider.java
@@ -30,6 +30,7 @@ import java.util.stream.Stream;
import org.apache.activemq.artemis.jdbc.store.drivers.JDBCConnectionProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
import static java.lang.String.format;
@@ -42,7 +43,7 @@ import static java.lang.String.format;
*/
public class PropertySQLProvider implements SQLProvider {
- private static final Logger logger = LoggerFactory.getLogger(PropertySQLProvider.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private enum LetterCase implements Function {
upper(String::toUpperCase),
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/api/jms/ActiveMQJMSClient.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/api/jms/ActiveMQJMSClient.java
index 10586ec2cb..f6093acd9d 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/api/jms/ActiveMQJMSClient.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/api/jms/ActiveMQJMSClient.java
@@ -28,12 +28,13 @@ import org.apache.activemq.artemis.uri.ConnectionFactoryParser;
import org.apache.activemq.artemis.utils.ClassloadingUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
/**
* A utility class for creating ActiveMQ Artemis client-side JMS managed resources.
*/
public class ActiveMQJMSClient {
- private static final Logger logger = LoggerFactory.getLogger(ActiveMQJMSClient.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
public static final boolean DEFAULT_ENABLE_1X_PREFIXES;
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
index 6637317dec..a9e761b1df 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
@@ -46,13 +46,14 @@ import org.apache.activemq.artemis.utils.UUID;
import org.apache.activemq.artemis.utils.UUIDGenerator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
/**
* ActiveMQ Artemis implementation of a JMS MessageProducer.
*/
public class ActiveMQMessageProducer implements MessageProducer, QueueSender, TopicPublisher {
- private static final Logger logger = LoggerFactory.getLogger(ActiveMQMessageProducer.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private final ConnectionFactoryOptions options;
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/uri/TCPSchema.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/uri/TCPSchema.java
index d682b59bee..affab7a97d 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/uri/TCPSchema.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/uri/TCPSchema.java
@@ -32,10 +32,11 @@ import org.apache.activemq.artemis.utils.uri.BeanSupport;
import org.apache.activemq.artemis.utils.uri.SchemaConstants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
public class TCPSchema extends AbstractCFSchema {
- private static final Logger logger = LoggerFactory.getLogger(TCPSchema.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@Override
public String getSchemaName() {
diff --git a/artemis-jms-client/src/test/java/org/apache/activemq/artemis/uri/ConnectionFactoryURITest.java b/artemis-jms-client/src/test/java/org/apache/activemq/artemis/uri/ConnectionFactoryURITest.java
index 71e9e575a8..be0ffb8cfd 100644
--- a/artemis-jms-client/src/test/java/org/apache/activemq/artemis/uri/ConnectionFactoryURITest.java
+++ b/artemis-jms-client/src/test/java/org/apache/activemq/artemis/uri/ConnectionFactoryURITest.java
@@ -53,10 +53,11 @@ import org.junit.Assert;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
public class ConnectionFactoryURITest {
- private static final Logger log = LoggerFactory.getLogger(ConnectionFactoryURITest.class);
+ private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
ConnectionFactoryParser parser = new ConnectionFactoryParser();
diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeImpl.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeImpl.java
index aff9967368..bda6521506 100644
--- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeImpl.java
+++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeImpl.java
@@ -75,10 +75,11 @@ import org.apache.activemq.artemis.service.extensions.xa.recovery.XARecoveryConf
import org.apache.activemq.artemis.utils.PasswordMaskingUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
public final class JMSBridgeImpl implements JMSBridge {
- private static final Logger logger = LoggerFactory.getLogger(JMSBridgeImpl.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private static final String[] RESOURCE_RECOVERY_CLASS_NAMES = new String[]{"org.jboss.as.messaging.jms.AS7RecoveryRegistry"};
diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/AbstractSequentialFile.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/AbstractSequentialFile.java
index 4cd59ecae8..ba970de2a6 100644
--- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/AbstractSequentialFile.java
+++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/AbstractSequentialFile.java
@@ -39,11 +39,12 @@ import org.apache.activemq.artemis.journal.ActiveMQJournalBundle;
import org.apache.activemq.artemis.journal.ActiveMQJournalLogger;
import org.apache.activemq.artemis.utils.ByteUtil;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
import org.slf4j.Logger;
public abstract class AbstractSequentialFile implements SequentialFile {
- private static final Logger logger = LoggerFactory.getLogger(AbstractSequentialFile.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
protected File file;
diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/AbstractSequentialFileFactory.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/AbstractSequentialFileFactory.java
index 3359240235..3781bbee99 100644
--- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/AbstractSequentialFileFactory.java
+++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/AbstractSequentialFileFactory.java
@@ -36,6 +36,7 @@ import org.apache.activemq.artemis.utils.ActiveMQThreadFactory;
import org.apache.activemq.artemis.utils.critical.CriticalAnalyzer;
import org.apache.activemq.artemis.utils.critical.EmptyCriticalAnalyzer;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
import org.slf4j.Logger;
/**
@@ -43,7 +44,7 @@ import org.slf4j.Logger;
*/
public abstract class AbstractSequentialFileFactory implements SequentialFileFactory {
- private static final Logger logger = LoggerFactory.getLogger(AbstractSequentialFileFactory.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
// Timeout used to wait executors to shutdown
protected static final int EXECUTOR_TIMEOUT = 60;
diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/RunnableCallback.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/RunnableCallback.java
index e753a3fb48..e704bb4697 100644
--- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/RunnableCallback.java
+++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/RunnableCallback.java
@@ -19,9 +19,10 @@ package org.apache.activemq.artemis.core.io;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
public class RunnableCallback implements IOCallback {
- private static final Logger logger = LoggerFactory.getLogger(RunnableCallback.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
Runnable okCallback;
Runnable errorCallback;
diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/aio/AIOSequentialFile.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/aio/AIOSequentialFile.java
index e304aa4ba1..33f92c6d99 100644
--- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/aio/AIOSequentialFile.java
+++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/aio/AIOSequentialFile.java
@@ -32,12 +32,13 @@ import org.apache.activemq.artemis.core.io.SequentialFile;
import org.apache.activemq.artemis.core.journal.impl.SimpleWaitIOCallback;
import org.apache.activemq.artemis.nativo.jlibaio.LibaioFile;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
import org.slf4j.Logger;
/** This class is implementing Runnable to reuse a callback to close it. */
public class AIOSequentialFile extends AbstractSequentialFile {
- private static final Logger logger = LoggerFactory.getLogger(AIOSequentialFileFactory.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private boolean opened = false;
diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/aio/AIOSequentialFileFactory.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/aio/AIOSequentialFileFactory.java
index 9dbf2fe059..3395505c3d 100644
--- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/aio/AIOSequentialFileFactory.java
+++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/aio/AIOSequentialFileFactory.java
@@ -40,13 +40,14 @@ import org.apache.activemq.artemis.utils.ByteUtil;
import org.apache.activemq.artemis.utils.PowerOf2Util;
import org.apache.activemq.artemis.utils.critical.CriticalAnalyzer;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
import org.slf4j.Logger;
import org.jctools.queues.MpmcArrayQueue;
import org.jctools.queues.atomic.MpmcAtomicArrayQueue;
public final class AIOSequentialFileFactory extends AbstractSequentialFileFactory {
- private static final Logger logger = LoggerFactory.getLogger(AIOSequentialFileFactory.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
// This is useful in cases where you want to disable loading the native library. (e.g. testsuite)
private static final boolean DISABLED = System.getProperty(AIOSequentialFileFactory.class.getName() + ".DISABLED") != null;
diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/buffer/TimedBuffer.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/buffer/TimedBuffer.java
index 6182927a03..2f6c676fba 100644
--- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/buffer/TimedBuffer.java
+++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/buffer/TimedBuffer.java
@@ -36,6 +36,7 @@ import org.apache.activemq.artemis.utils.ArtemisCloseable;
import org.apache.activemq.artemis.utils.critical.CriticalAnalyzer;
import org.apache.activemq.artemis.utils.critical.CriticalComponentImpl;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
import org.slf4j.Logger;
public final class TimedBuffer extends CriticalComponentImpl {
@@ -48,7 +49,7 @@ public final class TimedBuffer extends CriticalComponentImpl {
protected static final int CRITICAL_PATH_ADD_BYTES = 4;
protected static final int CRITICAL_PATH_SET_OBSERVER = 5;
- private static final Logger logger = LoggerFactory.getLogger(TimedBuffer.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private static final double MAX_TIMEOUT_ERROR_FACTOR = 1.5;
diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/mapped/MappedFile.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/mapped/MappedFile.java
index 0d5e34f2be..3873078f1b 100644
--- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/mapped/MappedFile.java
+++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/mapped/MappedFile.java
@@ -31,11 +31,12 @@ import org.apache.activemq.artemis.core.journal.EncodingSupport;
import org.apache.activemq.artemis.utils.PowerOf2Util;
import org.apache.activemq.artemis.utils.Env;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
import org.slf4j.Logger;
final class MappedFile implements AutoCloseable {
- private static final Logger logger = LoggerFactory.getLogger(MappedFile.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private static final int OS_PAGE_SIZE = Env.osPageSize();
private final MappedByteBuffer buffer;
diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/nio/NIOSequentialFile.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/nio/NIOSequentialFile.java
index 6c00295a12..b45f0e13d4 100644
--- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/nio/NIOSequentialFile.java
+++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/nio/NIOSequentialFile.java
@@ -45,10 +45,11 @@ import org.apache.activemq.artemis.journal.ActiveMQJournalBundle;
import org.apache.activemq.artemis.utils.Env;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
public class NIOSequentialFile extends AbstractSequentialFile {
- private static final Logger logger = LoggerFactory.getLogger(NIOSequentialFile.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private static final boolean DEBUG_OPENS = false;
diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/util/FileIOUtil.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/util/FileIOUtil.java
index 90595fec27..c703d10867 100644
--- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/util/FileIOUtil.java
+++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/util/FileIOUtil.java
@@ -21,11 +21,12 @@ import java.nio.ByteBuffer;
import org.apache.activemq.artemis.core.io.SequentialFile;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
import org.slf4j.Logger;
public class FileIOUtil {
- private static final Logger logger = LoggerFactory.getLogger(FileIOUtil.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
public static void copyData(SequentialFile from, SequentialFile to, ByteBuffer buffer) throws Exception {
diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalCompactor.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalCompactor.java
index d7f14b0191..605f5d0f8b 100644
--- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalCompactor.java
+++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalCompactor.java
@@ -39,11 +39,12 @@ import org.apache.activemq.artemis.utils.RunnableEx;
import org.apache.activemq.artemis.utils.collections.ConcurrentLongHashMap;
import org.apache.activemq.artemis.utils.collections.ConcurrentLongHashSet;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
import org.slf4j.Logger;
public class JournalCompactor extends AbstractJournalUpdateTask implements JournalRecordProvider {
- private static final Logger logger = LoggerFactory.getLogger(JournalCompactor.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
LongObjectHashMap> pendingWritesOnTX = new LongObjectHashMap<>();
IntObjectHashMap> pendingUpdates = new IntObjectHashMap<>();
diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalFileImpl.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalFileImpl.java
index 04ca0f27b0..56cc85385b 100644
--- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalFileImpl.java
+++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalFileImpl.java
@@ -24,6 +24,7 @@ import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
import org.apache.activemq.artemis.core.io.SequentialFile;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
import org.slf4j.Logger;
import static org.apache.activemq.artemis.utils.Preconditions.checkNotNull;
@@ -65,7 +66,7 @@ public class JournalFileImpl implements JournalFile {
private final ConcurrentMap negCounts = new ConcurrentHashMap<>();
- private static final Logger logger = LoggerFactory.getLogger(JournalFileImpl.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
public JournalFileImpl(final SequentialFile file, final long fileID, final int version) {
checkNotNull(file);
diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalFilesRepository.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalFilesRepository.java
index 97e9b58458..50da09c5a3 100644
--- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalFilesRepository.java
+++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalFilesRepository.java
@@ -42,6 +42,7 @@ import org.apache.activemq.artemis.core.io.SequentialFileFactory;
import org.apache.activemq.artemis.journal.ActiveMQJournalBundle;
import org.apache.activemq.artemis.journal.ActiveMQJournalLogger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
import org.slf4j.Logger;
/**
@@ -50,7 +51,7 @@ import org.slf4j.Logger;
*/
public class JournalFilesRepository {
- private static final Logger logger = LoggerFactory.getLogger(JournalFilesRepository.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
/**
* Used to debug the consistency of the journal ordering.
diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalImpl.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalImpl.java
index 20940392ed..d56041ad66 100644
--- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalImpl.java
+++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalImpl.java
@@ -92,6 +92,7 @@ import org.apache.activemq.artemis.utils.collections.ConcurrentLongHashMap;
import org.apache.activemq.artemis.utils.collections.LongHashSet;
import org.apache.activemq.artemis.utils.collections.SparseArrayLinkedList;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
import org.slf4j.Logger;
import static org.apache.activemq.artemis.core.journal.impl.Reclaimer.scan;
@@ -101,7 +102,7 @@ import static org.apache.activemq.artemis.core.journal.impl.Reclaimer.scan;
* Look at {@link JournalImpl#load(LoaderCallback)} for the file layout
*/
public class JournalImpl extends JournalBase implements TestableJournal, JournalRecordProvider {
- private static final Logger logger = LoggerFactory.getLogger(JournalImpl.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
/**
diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalTransaction.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalTransaction.java
index df53d1e4ae..c8a74defd4 100644
--- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalTransaction.java
+++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalTransaction.java
@@ -29,11 +29,12 @@ import java.util.concurrent.atomic.AtomicInteger;
import org.apache.activemq.artemis.api.core.ActiveMQExceptionType;
import org.apache.activemq.artemis.core.journal.impl.dataformat.JournalInternalRecord;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
import org.slf4j.Logger;
public class JournalTransaction {
- private static final Logger logger = LoggerFactory.getLogger(JournalTransaction.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private JournalRecordProvider journal;
diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/Reclaimer.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/Reclaimer.java
index 254a4694d5..bb3df9ecc8 100644
--- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/Reclaimer.java
+++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/Reclaimer.java
@@ -17,6 +17,7 @@
package org.apache.activemq.artemis.core.journal.impl;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
import org.slf4j.Logger;
/**
@@ -35,7 +36,7 @@ import org.slf4j.Logger;
*/
public final class Reclaimer {
- private static final Logger logger = LoggerFactory.getLogger(Reclaimer.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private Reclaimer() {
}
diff --git a/artemis-junit/src/main/java/org/apache/activemq/artemis/junit/EmbeddedActiveMQResource.java b/artemis-junit/src/main/java/org/apache/activemq/artemis/junit/EmbeddedActiveMQResource.java
index 093dd36409..461173e4ff 100644
--- a/artemis-junit/src/main/java/org/apache/activemq/artemis/junit/EmbeddedActiveMQResource.java
+++ b/artemis-junit/src/main/java/org/apache/activemq/artemis/junit/EmbeddedActiveMQResource.java
@@ -46,6 +46,7 @@ import org.apache.activemq.artemis.core.settings.impl.AddressSettings;
import org.junit.rules.ExternalResource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
/**
* A JUnit Rule that embeds an ActiveMQ Artemis server into a test.
@@ -66,11 +67,10 @@ import org.slf4j.LoggerFactory;
*
*/
public class EmbeddedActiveMQResource extends ExternalResource {
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
static final String SERVER_NAME = "embedded-server";
- Logger log = LoggerFactory.getLogger(this.getClass());
-
boolean useDurableMessage = true;
boolean useDurableQueue = true;
long defaultReceiveTimeout = 50;
@@ -185,7 +185,7 @@ public class EmbeddedActiveMQResource extends ExternalResource {
try {
server.stop();
} catch (Exception ex) {
- log.warn(String.format("Exception encountered stopping %s: %s", server.getClass().getSimpleName(), this.getServerName()), ex);
+ logger.warn(String.format("Exception encountered stopping %s: %s", server.getClass().getSimpleName(), this.getServerName()), ex);
}
}
}
@@ -195,7 +195,7 @@ public class EmbeddedActiveMQResource extends ExternalResource {
*/
@Override
protected void before() throws Throwable {
- log.info("Starting {}: {}", this.getClass().getSimpleName(), getServerName());
+ logger.info("Starting {}: {}", this.getClass().getSimpleName(), getServerName());
this.start();
@@ -207,7 +207,7 @@ public class EmbeddedActiveMQResource extends ExternalResource {
*/
@Override
protected void after() {
- log.info("Stopping {}: {}", this.getClass().getSimpleName(), getServerName());
+ logger.info("Stopping {}: {}", this.getClass().getSimpleName(), getServerName());
this.stop();
@@ -311,7 +311,7 @@ public class EmbeddedActiveMQResource extends ExternalResource {
public long getMessageCount(SimpleString queueName) {
Queue queue = locateQueue(queueName);
if (queue == null) {
- log.warn("getMessageCount(queueName) - queue {} not found; returning -1", queueName.toString());
+ logger.warn("getMessageCount(queueName) - queue {} not found; returning -1", queueName.toString());
return -1;
}
@@ -728,7 +728,7 @@ public class EmbeddedActiveMQResource extends ExternalResource {
private InternalClient getInternalClient() {
if (internalClient == null) {
- log.info("Creating Internal Client");
+ logger.info("Creating Internal Client");
internalClient = new InternalClient();
internalClient.start();
}
@@ -758,7 +758,7 @@ public class EmbeddedActiveMQResource extends ExternalResource {
}
void start() {
- log.info("Starting {}", this.getClass().getSimpleName());
+ logger.info("Starting {}", this.getClass().getSimpleName());
try {
serverLocator = ActiveMQClient.createServerLocator(getVmURL());
sessionFactory = serverLocator.createSessionFactory();
@@ -782,7 +782,7 @@ public class EmbeddedActiveMQResource extends ExternalResource {
try {
producer.close();
} catch (ActiveMQException amqEx) {
- log.warn("ActiveMQException encountered closing InternalClient ClientProducer - ignoring", amqEx);
+ logger.warn("ActiveMQException encountered closing InternalClient ClientProducer - ignoring", amqEx);
} finally {
producer = null;
}
@@ -791,7 +791,7 @@ public class EmbeddedActiveMQResource extends ExternalResource {
try {
session.close();
} catch (ActiveMQException amqEx) {
- log.warn("ActiveMQException encountered closing InternalClient ClientSession - ignoring", amqEx);
+ logger.warn("ActiveMQException encountered closing InternalClient ClientSession - ignoring", amqEx);
} finally {
session = null;
}
diff --git a/artemis-junit/src/main/java/org/apache/activemq/artemis/junit/EmbeddedJMSResource.java b/artemis-junit/src/main/java/org/apache/activemq/artemis/junit/EmbeddedJMSResource.java
index acd98b87f4..7b4324b55d 100644
--- a/artemis-junit/src/main/java/org/apache/activemq/artemis/junit/EmbeddedJMSResource.java
+++ b/artemis-junit/src/main/java/org/apache/activemq/artemis/junit/EmbeddedJMSResource.java
@@ -54,6 +54,7 @@ import org.apache.activemq.artemis.jms.server.embedded.EmbeddedJMS;
import org.junit.rules.ExternalResource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
/**
* Deprecated in favor of EmbeddedActiveMQResource. Since Artemis 2.0 all JMS specific broker management classes,
@@ -78,6 +79,7 @@ import org.slf4j.LoggerFactory;
*/
@Deprecated
public class EmbeddedJMSResource extends ExternalResource {
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
static final String SERVER_NAME = "embedded-jms-server";
diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPConnectionCallback.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPConnectionCallback.java
index c795e990f0..4b660d355d 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPConnectionCallback.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPConnectionCallback.java
@@ -54,12 +54,13 @@ import org.apache.qpid.proton.amqp.Symbol;
import org.apache.qpid.proton.amqp.transport.AmqpError;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
import io.netty.buffer.ByteBuf;
public class AMQPConnectionCallback implements FailureListener, CloseListener {
- private static final Logger logger = LoggerFactory.getLogger(AMQPConnectionCallback.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private final ConcurrentMap transactions = new ConcurrentHashMap<>();
diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java
index b322e6f9d9..bad9749b82 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java
@@ -80,6 +80,7 @@ import org.apache.qpid.proton.message.Message;
import org.apache.qpid.proton.message.impl.MessageImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.getCharsetForTextualContent;
@@ -119,7 +120,7 @@ public abstract class AMQPMessage extends RefCountMessage implements org.apache.
private static final SimpleString ANNOTATION_AREA_PREFIX = SimpleString.toSimpleString("m.");
- protected static final Logger logger = LoggerFactory.getLogger(AMQPMessage.class);
+ protected static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
public static final SimpleString ADDRESS_PROPERTY = SimpleString.toSimpleString("_AMQ_AD");
// used to perform quick search
diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPSessionCallback.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPSessionCallback.java
index eecf88c24a..972ec58763 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPSessionCallback.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPSessionCallback.java
@@ -79,10 +79,11 @@ import org.apache.qpid.proton.engine.EndpointState;
import org.apache.qpid.proton.engine.Receiver;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
public class AMQPSessionCallback implements SessionCallback {
- private static final Logger logger = LoggerFactory.getLogger(AMQPSessionCallback.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private static final Symbol PRIORITY = Symbol.getSymbol("priority");
diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/ProtonProtocolManager.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/ProtonProtocolManager.java
index eca2f4a2e9..a34184ae6b 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/ProtonProtocolManager.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/ProtonProtocolManager.java
@@ -51,13 +51,14 @@ import io.netty.channel.ChannelPipeline;
import org.apache.activemq.artemis.utils.DestinationUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
/**
* A proton protocol manager, basically reads the Proton Input and maps proton resources to ActiveMQ Artemis resources
*/
public class ProtonProtocolManager extends AbstractProtocolManager implements NotificationListener {
- private static final Logger logger = LoggerFactory.getLogger(ProtonProtocolManager.class);
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private static final List websocketRegistryNames = Arrays.asList("amqp");
diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/client/ProtonClientConnectionManager.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/client/ProtonClientConnectionManager.java
index 48e69eeb15..cd80501235 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/client/ProtonClientConnectionManager.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/client/ProtonClientConnectionManager.java
@@ -30,6 +30,7 @@ import org.apache.activemq.artemis.spi.core.remoting.BufferHandler;
import org.apache.activemq.artemis.spi.core.remoting.Connection;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
import java.util.Map;
import java.util.Optional;
@@ -40,7 +41,7 @@ import java.util.concurrent.ConcurrentHashMap;
*/
public class ProtonClientConnectionManager implements BaseConnectionLifeCycleListener, BufferHandler {
private final Map