Skip to content

Commit

Permalink
relax logging (#2053)
Browse files Browse the repository at this point in the history
  • Loading branch information
rogeralsing authored Sep 17, 2023
1 parent f0c1c41 commit 24fa206
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/Proto.Actor/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@

using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("Proto.Actor.Tests")]
[assembly: InternalsVisibleTo("Proto.Actor.Tests")]
[assembly: InternalsVisibleTo("Proto.Premium")]
15 changes: 12 additions & 3 deletions src/Proto.Remote/Endpoints/ServerConnector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,18 @@ await call.RequestStream.WriteAsync(new RemoteMessage

if (ShouldStop(rs))
{
_logger.LogError(e,
"[ServerConnector][{SystemAddress}] Stopping connection to {Address} after retries expired because of {Reason}",
_system.Address, _address, e.GetType().Name);
if (e is RpcException { StatusCode: StatusCode.Unavailable })
{
_logger.LogInformation(
"[ServerConnector][{SystemAddress}] Stopping connection to {Address} after retries expired because the endpoint is unavailable",
_system.Address, _address);
}
else
{
_logger.LogError(e,
"[ServerConnector][{SystemAddress}] Stopping connection to {Address} after retries expired because of {Reason}",
_system.Address, _address, e.GetType().Name);
}

var terminated = new EndpointTerminatedEvent(true, _address, actorSystemId);
_system.EventStream.Publish(terminated);
Expand Down

0 comments on commit 24fa206

Please sign in to comment.