diff --git a/http-core/src/main/scala/org/apache/pekko/http/impl/util/StageLoggingWithOverride.scala b/http-core/src/main/scala/org/apache/pekko/http/impl/util/StageLoggingWithOverride.scala index c7ace934a..dd6592eb0 100644 --- a/http-core/src/main/scala/org/apache/pekko/http/impl/util/StageLoggingWithOverride.scala +++ b/http-core/src/main/scala/org/apache/pekko/http/impl/util/StageLoggingWithOverride.scala @@ -19,8 +19,7 @@ package org.apache.pekko.http.impl.util import org.apache.pekko import pekko.annotation.InternalApi import pekko.stream.stage.GraphStageLogic -import pekko.event.{ LogSource, LoggingAdapter, NoLogging } -import pekko.stream.ActorMaterializer +import pekko.event.{ LogSource, LoggingAdapter } // TODO Try to reconcile with what Pekko provides in StageLogging. // We thought this could be removed when https://github.com/akka/akka/issues/18793 had been implemented @@ -43,10 +42,7 @@ private[pekko] trait StageLoggingWithOverride extends GraphStageLogic { _log = logOverride match { case DefaultNoLogging => - materializer match { - case a: ActorMaterializer => pekko.event.Logging(a.system, logSource)(LogSource.fromClass) - case _ => NoLogging - } + pekko.event.Logging(materializer.system, logSource)(LogSource.fromClass) case x => x } case _ =>