diff --git a/src/Proto.Cluster/Gossip/Gossiper.cs b/src/Proto.Cluster/Gossip/Gossiper.cs index ff3424d3d3..b04d784d9a 100644 --- a/src/Proto.Cluster/Gossip/Gossiper.cs +++ b/src/Proto.Cluster/Gossip/Gossiper.cs @@ -258,7 +258,6 @@ private async Task BlockGracefullyLeft() if (gracefullyLeft.Any()) { - Logger.LogInformation("Blocking members due to gracefully leaving {Members}", gracefullyLeft); blockList.Block(gracefullyLeft, "Gracefully left"); } } @@ -288,9 +287,6 @@ where x.Value.Age > _cluster.Config.HeartbeatExpiration if (blocked.Any()) { - Logger.LogInformation("Blocking members due to expired heartbeat {Members}", - blocked.Cast().ToArray()); - blockList.Block(blocked, "Expired heartbeat"); } } diff --git a/src/Proto.Cluster/Member/MemberList.cs b/src/Proto.Cluster/Member/MemberList.cs index 9ebbcd13a1..98401bf5ce 100644 --- a/src/Proto.Cluster/Member/MemberList.cs +++ b/src/Proto.Cluster/Member/MemberList.cs @@ -314,9 +314,9 @@ private void TerminateMember(Member memberThatLeft) { var endpointTerminated = new EndpointTerminatedEvent(true, memberThatLeft.Address, memberThatLeft.Id); - if (Logger.IsEnabled(LogLevel.Information)) + if (Logger.IsEnabled(LogLevel.Debug)) { - Logger.LogInformation("[MemberList] Published event {@EndpointTerminated}", endpointTerminated); + Logger.LogDebug("[MemberList] Published event {@EndpointTerminated}", endpointTerminated); } _cluster.System.EventStream.Publish(endpointTerminated); diff --git a/src/Proto.Cluster/Partition/PartitionIdentityActor.cs b/src/Proto.Cluster/Partition/PartitionIdentityActor.cs index 896e530ea9..073c83d6ff 100644 --- a/src/Proto.Cluster/Partition/PartitionIdentityActor.cs +++ b/src/Proto.Cluster/Partition/PartitionIdentityActor.cs @@ -161,9 +161,9 @@ private void ReceiveIdentityHandover(HandoverSink sink, IdentityHandover msg, st } } - if (Logger.IsEnabled(LogLevel.Information)) + if (Logger.IsEnabled(LogLevel.Debug)) { - Logger.LogInformation( + Logger.LogDebug( "[PartitionIdentity] Topology {TopologyHash} rebalance completed in {Elapsed}, received {@Stats}", TopologyHash, _rebalanceTimer?.Elapsed, sink.CompletedHandovers); } @@ -256,10 +256,13 @@ private Task OnClusterTopology(ClusterTopology msg, IContext context) _currentHandover = new HandoverSink(msg, TakeOverIdentities(context)); _rebalanceTimer = Stopwatch.StartNew(); - Logger.LogInformation( - "{SystemId} topology {CurrentTopology} Pausing activations while rebalance in progress, {SpawnCount} spawns waiting", - _cluster.System.Id, TopologyHash, _spawns.Count - ); + if (Logger.IsEnabled(LogLevel.Debug)) + { + Logger.LogDebug( + "{SystemId} topology {CurrentTopology} Pausing activations while rebalance in progress, {SpawnCount} spawns waiting", + _cluster.System.Id, TopologyHash, _spawns.Count + ); + } if (_config.Mode == PartitionIdentityLookup.Mode.Push) // Good things comes to those who wait { @@ -297,7 +300,7 @@ private Task OnClusterTopology(ClusterTopology msg, IContext context) } else { - Logger.LogError( + Logger.LogWarning( "[PartitionIdentity] {SystemId} Consensus not reached, Initiating rebalance:, {CurrentTopology} {ConsensusHash} after {Duration}", _cluster.System.Id, TopologyHash, consensusResult.Result.topologyHash, timer.Elapsed ); @@ -412,18 +415,18 @@ private void StartPartitionPull( ClusterTopology? deltaBaseline = null ) { - if (Logger.IsEnabled(LogLevel.Information)) + if (Logger.IsEnabled(LogLevel.Debug)) { if (deltaBaseline is not null) { - Logger.LogInformation( + Logger.LogDebug( "[PartitionIdentity] Pulling activations between topology {PrevTopology} and {CurrentTopology} from {@MemberAddresses}", deltaBaseline.TopologyHash, msg.TopologyHash, memberAddresses ); } else { - Logger.LogInformation( + Logger.LogDebug( "[PartitionIdentity] Pulling activations for topology {CurrentTopology} from {@MemberAddresses}", msg.TopologyHash, memberAddresses diff --git a/src/Proto.Cluster/Partition/PartitionIdentityRebalanceWorker.cs b/src/Proto.Cluster/Partition/PartitionIdentityRebalanceWorker.cs index 8f821e36f9..de8738a51f 100644 --- a/src/Proto.Cluster/Partition/PartitionIdentityRebalanceWorker.cs +++ b/src/Proto.Cluster/Partition/PartitionIdentityRebalanceWorker.cs @@ -96,11 +96,14 @@ private Task OnPartitionCompleted(PartitionCompleted response, IContext context) if (_remainingPartitions.Count == 0) { - Logger.LogInformation( - "[PartitionIdentity] Pulled activations from {MemberCount} partitions completed in {Elapsed}", - _request!.CurrentTopology.Members.Count, - _timer!.Elapsed - ); + if (Logger.IsEnabled(LogLevel.Debug)) + { + Logger.LogDebug( + "[PartitionIdentity] Pulled activations from {MemberCount} partitions completed in {Elapsed}", + _request!.CurrentTopology.Members.Count, + _timer!.Elapsed + ); + } context.Self.Stop(context.System); }