diff --git a/src/MagicOnion.Server/Diagnostics/MagicOnionServerLog.cs b/src/MagicOnion.Server/Diagnostics/MagicOnionServerLog.cs index 8ac78cc5a..03153a525 100644 --- a/src/MagicOnion.Server/Diagnostics/MagicOnionServerLog.cs +++ b/src/MagicOnion.Server/Diagnostics/MagicOnionServerLog.cs @@ -67,17 +67,17 @@ static string MethodTypeToString(MethodType type) => [LoggerMessage(EventId = 9, Level = LogLevel.Debug, EventName = nameof(InvokeHubBroadcast), Message = nameof(InvokeHubBroadcast) + " groupName:{groupName} size:{size} broadcastGroupCount:{broadcastGroupCount}")] public static partial void InvokeHubBroadcast(ILogger logger, string groupName, int size, int broadcastGroupCount); - [LoggerMessage(EventId = 10, Level = LogLevel.Debug, EventName = nameof(BeginHeartbeat), Message = nameof(BeginHeartbeat) + " handlerName:{handlerName}")] - public static partial void BeginHeartbeat(ILogger logger, string handlerName); + [LoggerMessage(EventId = 10, Level = LogLevel.Debug, EventName = nameof(BeginHeartbeatTimer), Message = nameof(BeginHeartbeatTimer) + " method:{method}, heartbeatInterval:{heartbeatInterval}, timeoutDuration:{timeoutDuration}")] + public static partial void BeginHeartbeatTimer(ILogger logger, string method, TimeSpan heartbeatInterval, TimeSpan timeoutDuration); - [LoggerMessage(EventId = 11, Level = LogLevel.Debug, EventName = nameof(ShutdownHeartbeat), Message = nameof(ShutdownHeartbeat) + " handlerName:{handlerName}")] - public static partial void ShutdownHeartbeat(ILogger logger, string handlerName); + [LoggerMessage(EventId = 11, Level = LogLevel.Debug, EventName = nameof(ShutdownHeartbeatTimer), Message = nameof(ShutdownHeartbeatTimer) + " method:{method}")] + public static partial void ShutdownHeartbeatTimer(ILogger logger, string method); - [LoggerMessage(EventId = 12, Level = LogLevel.Debug, EventName = nameof(HeartbeatTimedOut), Message = nameof(HeartbeatTimedOut) + " handlerName:{handlerName}, connectionId:{connectionId}")] - public static partial void HeartbeatTimedOut(ILogger logger, string handlerName, Guid connectionId); + [LoggerMessage(EventId = 12, Level = LogLevel.Debug, EventName = nameof(HeartbeatTimedOut), Message = nameof(HeartbeatTimedOut) + " method:{method}, connectionId:{connectionId}")] + public static partial void HeartbeatTimedOut(ILogger logger, string method, Guid connectionId); - [LoggerMessage(EventId = 13, Level = LogLevel.Debug, EventName = nameof(SendHeartbeat), Message = nameof(SendHeartbeat))] - public static partial void SendHeartbeat(ILogger logger); + [LoggerMessage(EventId = 13, Level = LogLevel.Debug, EventName = nameof(SendHeartbeat), Message = nameof(SendHeartbeat) + " method:{method}")] + public static partial void SendHeartbeat(ILogger logger, string method); [LoggerMessage(EventId = 90, Level = LogLevel.Error, EventName = nameof(ErrorOnServiceMethod), Message = "A service handler throws an exception occurred in {method}")] public static partial void ErrorOnServiceMethod(ILogger logger, Exception ex, string method); diff --git a/src/MagicOnion.Server/Hubs/StreamingHubHeartbeatManager.cs b/src/MagicOnion.Server/Hubs/StreamingHubHeartbeatManager.cs index f812fec3d..3fb2eaa0c 100644 --- a/src/MagicOnion.Server/Hubs/StreamingHubHeartbeatManager.cs +++ b/src/MagicOnion.Server/Hubs/StreamingHubHeartbeatManager.cs @@ -91,16 +91,15 @@ public StreamingHubHeartbeatHandle Register(IStreamingServiceContext