diff --git a/cluster/cluster_test_tool/cluster_fixture.go b/cluster/cluster_test_tool/cluster_fixture.go index bacb3fa2..baaece23 100644 --- a/cluster/cluster_test_tool/cluster_fixture.go +++ b/cluster/cluster_test_tool/cluster_fixture.go @@ -2,13 +2,13 @@ package cluster_test_tool import ( "context" + "log/slog" "time" "github.com/asynkron/protoactor-go/actor" "github.com/asynkron/protoactor-go/cluster" "github.com/asynkron/protoactor-go/cluster/clusterproviders/test" "github.com/asynkron/protoactor-go/cluster/identitylookup/disthash" - "github.com/asynkron/protoactor-go/log" "github.com/asynkron/protoactor-go/remote" "github.com/google/uuid" "golang.org/x/sync/errgroup" @@ -128,7 +128,7 @@ func (b *BaseClusterFixture) RemoveNode(node *cluster.Cluster, graceful bool) { } } if !has { - plog.Error("node not found", log.Object("node", node)) + slog.Default().Error("node not found", slog.Any("node", node)) } } @@ -192,7 +192,7 @@ func (b *BaseClusterFixture) spawnClusterMember() *cluster.Cluster { // waitForMembersToShutdown waits for the members to shutdown func (b *BaseClusterFixture) waitForMembersToShutdown() { for _, member := range b.members { - plog.Info("Preparing shutdown for cluster member", log.String("member", member.ActorSystem.ID)) + slog.Default().Info("Preparing shutdown for cluster member", slog.String("member", member.ActorSystem.ID)) } group := new(errgroup.Group) @@ -204,7 +204,7 @@ func (b *BaseClusterFixture) waitForMembersToShutdown() { group.Go(func() error { done := make(chan struct{}) go func() { - plog.Info("Shutting down cluster member", log.String("member", member.ActorSystem.ID)) + slog.Default().Info("Shutting down cluster member", slog.String("member", member.ActorSystem.ID)) member.Shutdown(true) close(done) }() diff --git a/cluster/cluster_test_tool/pubsub_cluster_fixture.go b/cluster/cluster_test_tool/pubsub_cluster_fixture.go index 3bf5b039..fc15505d 100644 --- a/cluster/cluster_test_tool/pubsub_cluster_fixture.go +++ b/cluster/cluster_test_tool/pubsub_cluster_fixture.go @@ -2,6 +2,7 @@ package cluster_test_tool import ( "errors" + "log/slog" "math/rand" "strconv" "sync" @@ -50,7 +51,7 @@ func NewPubSubClusterFixture(t testing.TB, clusterSize int, useDefaultTopicRegis } if !fixture.useDefaultTopicRegistration { kinds = append(kinds, cluster.NewKind(cluster.TopicActorKind, actor.PropsFromProducer(func() actor.Actor { - return cluster.NewTopicActor(store) + return cluster.NewTopicActor(store, slog.Default()) }))) } return kinds