diff --git a/src/Microsoft.AspNetCore.SignalR.Core/Internal/DefaultHubDispatcher.Log.cs b/src/Microsoft.AspNetCore.SignalR.Core/Internal/DefaultHubDispatcher.Log.cs index 096b4ec229..10fb4da955 100644 --- a/src/Microsoft.AspNetCore.SignalR.Core/Internal/DefaultHubDispatcher.Log.cs +++ b/src/Microsoft.AspNetCore.SignalR.Core/Internal/DefaultHubDispatcher.Log.cs @@ -102,8 +102,11 @@ namespace Microsoft.AspNetCore.SignalR.Internal public static void SendingResult(ILogger logger, string invocationId, ObjectMethodExecutor objectMethodExecutor) { - var resultType = objectMethodExecutor.AsyncResultType == null ? objectMethodExecutor.MethodReturnType : objectMethodExecutor.AsyncResultType; - _sendingResult(logger, invocationId, resultType.FullName, null); + if (logger.IsEnabled(LogLevel.Trace)) + { + var resultType = objectMethodExecutor.AsyncResultType == null ? objectMethodExecutor.MethodReturnType : objectMethodExecutor.AsyncResultType; + _sendingResult(logger, invocationId, resultType.FullName, null); + } } public static void FailedInvokingHubMethod(ILogger logger, string hubMethod, Exception exception)