Skip to content

Commit

Permalink
fix: logger with proper class ref (#872)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-alfers committed Apr 24, 2023
1 parent bbb52d9 commit c987bf9
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class HandlerRecoveryImplSpec extends ScalaTestWithActorTestKit with AnyWordSpec
import HandlerRecoveryImplSpec._
import TestStatusObserver._

private val logger = Logging(system.toClassic, getClass.asInstanceOf[Class[Any]])
private val logger = Logging(system.toClassic, classOf[HandlerRecoveryImplSpec])
private val failOnOffset: Long = 3
private val env3 = Envelope(offset = failOnOffset, "c")
private val projectionId = ProjectionId("test", "1")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ object InternalProjectionStateMetricsSpec {
handlerStrategy,
statusObserver,
settings) {
override def logger: LoggingAdapter = Logging(system.classicSystem, this.getClass.asInstanceOf[Class[Any]])
override def logger: LoggingAdapter = Logging(system.classicSystem, classOf[InMemInternalProjectionState[_, _]])

override implicit def executionContext: ExecutionContext = system.executionContext

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ private[projection] class JdbcProjectionImpl[Offset, Envelope, S <: JdbcSession]
settings) {

implicit val executionContext: ExecutionContext = system.executionContext
override val logger: LoggingAdapter = Logging(system.classicSystem, this.getClass.asInstanceOf[Class[Any]])
override val logger: LoggingAdapter = Logging(system.classicSystem, classOf[JdbcProjectionImpl[_, _, _]])

override def readPaused(): Future[Boolean] =
offsetStore.readManagementState(projectionId).map(_.exists(_.paused))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ private[projection] class R2dbcProjectionImpl[Offset, Envelope](
settings) {

implicit val executionContext: ExecutionContext = system.executionContext
override val logger: LoggingAdapter = Logging(system.classicSystem, getClass.asInstanceOf[Class[Any]])
override val logger: LoggingAdapter = Logging(system.classicSystem, classOf[R2dbcProjectionImpl[_, _]])

private val isExactlyOnceWithSkip: Boolean =
offsetStrategy match {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ private[projection] class TestInternalProjectionState[Offset, Envelope](

startOffset.foreach(offset => offsetStore.saveOffset(projectionId, offset))

override val logger: LoggingAdapter = Logging(system.classicSystem, this.getClass.asInstanceOf[Class[Any]])
override val logger: LoggingAdapter = Logging(system.classicSystem, classOf[TestInternalProjectionState[_, _]])

override def readPaused(): Future[Boolean] =
offsetStore.readManagementState(projectionId).map(_.exists(_.paused))
Expand Down

0 comments on commit c987bf9

Please sign in to comment.