diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpChannel.java b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpChannel.java index fab738de9e2..a87c6ed4b97 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpChannel.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpChannel.java @@ -26,7 +26,7 @@ import org.eclipse.jetty.util.log.Logger; public abstract class HttpChannel { - protected static final Logger LOG = Log.getLogger(new Object(){}.getClass().getEnclosingClass()); + protected static final Logger LOG = Log.getLogger(HttpChannel.class); private final AtomicReference exchange = new AtomicReference<>(); private final HttpDestination destination; diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpDestination.java b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpDestination.java index 367cf664e57..cf4c2dfe907 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpDestination.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpDestination.java @@ -47,7 +47,7 @@ import org.eclipse.jetty.util.ssl.SslContextFactory; public abstract class HttpDestination implements Destination, Closeable, Dumpable { - protected static final Logger LOG = Log.getLogger(new Object(){}.getClass().getEnclosingClass()); + protected static final Logger LOG = Log.getLogger(HttpDestination.class); private final HttpClient client; private final String scheme; diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpReceiver.java b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpReceiver.java index b5dbe8dfae1..4ee0e9c5a91 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpReceiver.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpReceiver.java @@ -64,7 +64,7 @@ import org.eclipse.jetty.util.log.Logger; */ public abstract class HttpReceiver { - protected static final Logger LOG = Log.getLogger(new Object(){}.getClass().getEnclosingClass()); + protected static final Logger LOG = Log.getLogger(HttpReceiver.class); private final AtomicReference responseState = new AtomicReference<>(ResponseState.IDLE); private final HttpChannel channel; diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpSender.java b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpSender.java index 0b903b04870..2d4d8821123 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpSender.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpSender.java @@ -57,7 +57,7 @@ import org.eclipse.jetty.util.log.Logger; */ public abstract class HttpSender implements AsyncContentProvider.Listener { - protected static final Logger LOG = Log.getLogger(new Object(){}.getClass().getEnclosingClass()); + protected static final Logger LOG = Log.getLogger(HttpSender.class); private final AtomicReference requestState = new AtomicReference<>(RequestState.QUEUED); private final AtomicReference senderState = new AtomicReference<>(SenderState.IDLE);