Merge pull request #1623 from aspnet/release/2.1
Pascal case formatted log parameter names (#1615)
This commit is contained in:
commit
579131e182
|
|
@ -12,34 +12,34 @@ namespace Microsoft.AspNetCore.SignalR.Client
|
|||
private static class Log
|
||||
{
|
||||
private static readonly Action<ILogger, string, int, Exception> _preparingNonBlockingInvocation =
|
||||
LoggerMessage.Define<string, int>(LogLevel.Trace, new EventId(1, "PreparingNonBlockingInvocation"), "Preparing non-blocking invocation of '{target}', with {argumentCount} argument(s).");
|
||||
LoggerMessage.Define<string, int>(LogLevel.Trace, new EventId(1, "PreparingNonBlockingInvocation"), "Preparing non-blocking invocation of '{Target}', with {ArgumentCount} argument(s).");
|
||||
|
||||
private static readonly Action<ILogger, string, string, string, int, Exception> _preparingBlockingInvocation =
|
||||
LoggerMessage.Define<string, string, string, int>(LogLevel.Trace, new EventId(2, "PreparingBlockingInvocation"), "Preparing blocking invocation '{invocationId}' of '{target}', with return type '{returnType}' and {argumentCount} argument(s).");
|
||||
LoggerMessage.Define<string, string, string, int>(LogLevel.Trace, new EventId(2, "PreparingBlockingInvocation"), "Preparing blocking invocation '{InvocationId}' of '{Target}', with return type '{ReturnType}' and {ArgumentCount} argument(s).");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _registerInvocation =
|
||||
LoggerMessage.Define<string>(LogLevel.Debug, new EventId(3, "RegisterInvocation"), "Registering Invocation ID '{invocationId}' for tracking.");
|
||||
LoggerMessage.Define<string>(LogLevel.Debug, new EventId(3, "RegisterInvocation"), "Registering Invocation ID '{InvocationId}' for tracking.");
|
||||
|
||||
private static readonly Action<ILogger, string, string, string, string, Exception> _issueInvocation =
|
||||
LoggerMessage.Define<string, string, string, string>(LogLevel.Trace, new EventId(4, "IssueInvocation"), "Issuing Invocation '{invocationId}': {returnType} {methodName}({args}).");
|
||||
LoggerMessage.Define<string, string, string, string>(LogLevel.Trace, new EventId(4, "IssueInvocation"), "Issuing Invocation '{InvocationId}': {ReturnType} {MethodName}({Args}).");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _sendInvocation =
|
||||
LoggerMessage.Define<string>(LogLevel.Debug, new EventId(5, "SendInvocation"), "Sending Invocation '{invocationId}'.");
|
||||
LoggerMessage.Define<string>(LogLevel.Debug, new EventId(5, "SendInvocation"), "Sending Invocation '{InvocationId}'.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _sendInvocationCompleted =
|
||||
LoggerMessage.Define<string>(LogLevel.Debug, new EventId(6, "SendInvocationCompleted"), "Sending Invocation '{invocationId}' completed.");
|
||||
LoggerMessage.Define<string>(LogLevel.Debug, new EventId(6, "SendInvocationCompleted"), "Sending Invocation '{InvocationId}' completed.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _sendInvocationFailed =
|
||||
LoggerMessage.Define<string>(LogLevel.Error, new EventId(7, "SendInvocationFailed"), "Sending Invocation '{invocationId}' failed.");
|
||||
LoggerMessage.Define<string>(LogLevel.Error, new EventId(7, "SendInvocationFailed"), "Sending Invocation '{InvocationId}' failed.");
|
||||
|
||||
private static readonly Action<ILogger, string, string, string, Exception> _receivedInvocation =
|
||||
LoggerMessage.Define<string, string, string>(LogLevel.Trace, new EventId(8, "ReceivedInvocation"), "Received Invocation '{invocationId}': {methodName}({args}).");
|
||||
LoggerMessage.Define<string, string, string>(LogLevel.Trace, new EventId(8, "ReceivedInvocation"), "Received Invocation '{InvocationId}': {MethodName}({Args}).");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _dropCompletionMessage =
|
||||
LoggerMessage.Define<string>(LogLevel.Warning, new EventId(9, "DropCompletionMessage"), "Dropped unsolicited Completion message for invocation '{invocationId}'.");
|
||||
LoggerMessage.Define<string>(LogLevel.Warning, new EventId(9, "DropCompletionMessage"), "Dropped unsolicited Completion message for invocation '{InvocationId}'.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _dropStreamMessage =
|
||||
LoggerMessage.Define<string>(LogLevel.Warning, new EventId(10, "DropStreamMessage"), "Dropped unsolicited StreamItem message for invocation '{invocationId}'.");
|
||||
LoggerMessage.Define<string>(LogLevel.Warning, new EventId(10, "DropStreamMessage"), "Dropped unsolicited StreamItem message for invocation '{InvocationId}'.");
|
||||
|
||||
private static readonly Action<ILogger, Exception> _shutdownConnection =
|
||||
LoggerMessage.Define(LogLevel.Trace, new EventId(11, "ShutdownConnection"), "Shutting down connection.");
|
||||
|
|
@ -48,43 +48,43 @@ namespace Microsoft.AspNetCore.SignalR.Client
|
|||
LoggerMessage.Define(LogLevel.Error, new EventId(12, "ShutdownWithError"), "Connection is shutting down due to an error.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _removeInvocation =
|
||||
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(13, "RemoveInvocation"), "Removing pending invocation {invocationId}.");
|
||||
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(13, "RemoveInvocation"), "Removing pending invocation {InvocationId}.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _missingHandler =
|
||||
LoggerMessage.Define<string>(LogLevel.Warning, new EventId(14, "MissingHandler"), "Failed to find handler for '{target}' method.");
|
||||
LoggerMessage.Define<string>(LogLevel.Warning, new EventId(14, "MissingHandler"), "Failed to find handler for '{Target}' method.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _receivedStreamItem =
|
||||
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(15, "ReceivedStreamItem"), "Received StreamItem for Invocation {invocationId}.");
|
||||
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(15, "ReceivedStreamItem"), "Received StreamItem for Invocation {InvocationId}.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _cancelingStreamItem =
|
||||
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(16, "CancelingStreamItem"), "Canceling dispatch of StreamItem message for Invocation {invocationId}. The invocation was canceled.");
|
||||
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(16, "CancelingStreamItem"), "Canceling dispatch of StreamItem message for Invocation {InvocationId}. The invocation was canceled.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _receivedStreamItemAfterClose =
|
||||
LoggerMessage.Define<string>(LogLevel.Warning, new EventId(17, "ReceivedStreamItemAfterClose"), "Invocation {invocationId} received stream item after channel was closed.");
|
||||
LoggerMessage.Define<string>(LogLevel.Warning, new EventId(17, "ReceivedStreamItemAfterClose"), "Invocation {InvocationId} received stream item after channel was closed.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _receivedInvocationCompletion =
|
||||
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(18, "ReceivedInvocationCompletion"), "Received Completion for Invocation {invocationId}.");
|
||||
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(18, "ReceivedInvocationCompletion"), "Received Completion for Invocation {InvocationId}.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _cancelingInvocationCompletion =
|
||||
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(19, "CancelingInvocationCompletion"), "Canceling dispatch of Completion message for Invocation {invocationId}. The invocation was canceled.");
|
||||
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(19, "CancelingInvocationCompletion"), "Canceling dispatch of Completion message for Invocation {InvocationId}. The invocation was canceled.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _cancelingCompletion =
|
||||
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(20, "CancelingCompletion"), "Canceling dispatch of Completion message for Invocation {invocationId}. The invocation was canceled.");
|
||||
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(20, "CancelingCompletion"), "Canceling dispatch of Completion message for Invocation {InvocationId}. The invocation was canceled.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _invokeAfterTermination =
|
||||
LoggerMessage.Define<string>(LogLevel.Error, new EventId(21, "InvokeAfterTermination"), "Invoke for Invocation '{invocationId}' was called after the connection was terminated.");
|
||||
LoggerMessage.Define<string>(LogLevel.Error, new EventId(21, "InvokeAfterTermination"), "Invoke for Invocation '{InvocationId}' was called after the connection was terminated.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _invocationAlreadyInUse =
|
||||
LoggerMessage.Define<string>(LogLevel.Critical, new EventId(22, "InvocationAlreadyInUse"), "Invocation ID '{invocationId}' is already in use.");
|
||||
LoggerMessage.Define<string>(LogLevel.Critical, new EventId(22, "InvocationAlreadyInUse"), "Invocation ID '{InvocationId}' is already in use.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _receivedUnexpectedResponse =
|
||||
LoggerMessage.Define<string>(LogLevel.Error, new EventId(23, "ReceivedUnexpectedResponse"), "Unsolicited response received for invocation '{invocationId}'.");
|
||||
LoggerMessage.Define<string>(LogLevel.Error, new EventId(23, "ReceivedUnexpectedResponse"), "Unsolicited response received for invocation '{InvocationId}'.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _hubProtocol =
|
||||
LoggerMessage.Define<string>(LogLevel.Information, new EventId(24, "HubProtocol"), "Using HubProtocol '{protocol}'.");
|
||||
LoggerMessage.Define<string>(LogLevel.Information, new EventId(24, "HubProtocol"), "Using HubProtocol '{Protocol}'.");
|
||||
|
||||
private static readonly Action<ILogger, string, string, string, int, Exception> _preparingStreamingInvocation =
|
||||
LoggerMessage.Define<string, string, string, int>(LogLevel.Trace, new EventId(25, "PreparingStreamingInvocation"), "Preparing streaming invocation '{invocationId}' of '{target}', with return type '{returnType}' and {argumentCount} argument(s).");
|
||||
LoggerMessage.Define<string, string, string, int>(LogLevel.Trace, new EventId(25, "PreparingStreamingInvocation"), "Preparing streaming invocation '{InvocationId}' of '{Target}', with return type '{ReturnType}' and {ArgumentCount} argument(s).");
|
||||
|
||||
private static readonly Action<ILogger, Exception> _resettingKeepAliveTimer =
|
||||
LoggerMessage.Define(LogLevel.Trace, new EventId(26, "ResettingKeepAliveTimer"), "Resetting keep-alive timer, received a message from the server.");
|
||||
|
|
@ -96,22 +96,22 @@ namespace Microsoft.AspNetCore.SignalR.Client
|
|||
LoggerMessage.Define(LogLevel.Debug, new EventId(28, "SendingHubNegotiate"), "Sending Hub Negotiation.");
|
||||
|
||||
private static readonly Action<ILogger, int, Exception> _parsingMessages =
|
||||
LoggerMessage.Define<int>(LogLevel.Debug, new EventId(29, "ParsingMessages"), "Received {count} bytes. Parsing message(s).");
|
||||
LoggerMessage.Define<int>(LogLevel.Debug, new EventId(29, "ParsingMessages"), "Received {Count} bytes. Parsing message(s).");
|
||||
|
||||
private static readonly Action<ILogger, int, Exception> _receivingMessages =
|
||||
LoggerMessage.Define<int>(LogLevel.Debug, new EventId(30, "ReceivingMessages"), "Received {messageCount} message(s).");
|
||||
LoggerMessage.Define<int>(LogLevel.Debug, new EventId(30, "ReceivingMessages"), "Received {MessageCount} message(s).");
|
||||
|
||||
private static readonly Action<ILogger, Exception> _receivedPing =
|
||||
LoggerMessage.Define(LogLevel.Trace, new EventId(31, "ReceivedPing"), "Received a ping message.");
|
||||
|
||||
private static readonly Action<ILogger, int, Exception> _processedMessages =
|
||||
LoggerMessage.Define<int>(LogLevel.Debug, new EventId(32, "ProcessedMessages"), "Finished processing {messageCount} message(s).");
|
||||
LoggerMessage.Define<int>(LogLevel.Debug, new EventId(32, "ProcessedMessages"), "Finished processing {MessageCount} message(s).");
|
||||
|
||||
private static readonly Action<ILogger, int, Exception> _failedParsing =
|
||||
LoggerMessage.Define<int>(LogLevel.Warning, new EventId(33, "FailedParsing"), "No messages parsed from {count} byte(s).");
|
||||
LoggerMessage.Define<int>(LogLevel.Warning, new EventId(33, "FailedParsing"), "No messages parsed from {Count} byte(s).");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _errorInvokingClientSideMethod =
|
||||
LoggerMessage.Define<string>(LogLevel.Error, new EventId(34, "ErrorInvokingClientSideMethod"), "Invoking client side method '{methodName}' failed.");
|
||||
LoggerMessage.Define<string>(LogLevel.Error, new EventId(34, "ErrorInvokingClientSideMethod"), "Invoking client side method '{MethodName}' failed.");
|
||||
|
||||
public static void PreparingNonBlockingInvocation(ILogger logger, string target, int count)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -173,27 +173,27 @@ namespace Microsoft.AspNetCore.SignalR.Client
|
|||
{
|
||||
// Category: Streaming and NonStreaming
|
||||
private static readonly Action<ILogger, string, Exception> _invocationCreated =
|
||||
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(1, "InvocationCreated"), "Invocation {invocationId} created.");
|
||||
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(1, "InvocationCreated"), "Invocation {InvocationId} created.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _invocationDisposed =
|
||||
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(2, "InvocationDisposed"), "Invocation {invocationId} disposed.");
|
||||
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(2, "InvocationDisposed"), "Invocation {InvocationId} disposed.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _invocationCompleted =
|
||||
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(3, "InvocationCompleted"), "Invocation {invocationId} marked as completed.");
|
||||
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(3, "InvocationCompleted"), "Invocation {InvocationId} marked as completed.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _invocationFailed =
|
||||
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(4, "InvocationFailed"), "Invocation {invocationId} marked as failed.");
|
||||
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(4, "InvocationFailed"), "Invocation {InvocationId} marked as failed.");
|
||||
|
||||
// Category: Streaming
|
||||
private static readonly Action<ILogger, string, Exception> _errorWritingStreamItem =
|
||||
LoggerMessage.Define<string>(LogLevel.Error, new EventId(5, "ErrorWritingStreamItem"), "Invocation {invocationId} caused an error trying to write a stream item.");
|
||||
LoggerMessage.Define<string>(LogLevel.Error, new EventId(5, "ErrorWritingStreamItem"), "Invocation {InvocationId} caused an error trying to write a stream item.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _receivedUnexpectedComplete =
|
||||
LoggerMessage.Define<string>(LogLevel.Error, new EventId(6, "ReceivedUnexpectedComplete"), "Invocation {invocationId} received a completion result, but was invoked as a streaming invocation.");
|
||||
LoggerMessage.Define<string>(LogLevel.Error, new EventId(6, "ReceivedUnexpectedComplete"), "Invocation {InvocationId} received a completion result, but was invoked as a streaming invocation.");
|
||||
|
||||
// Category: NonStreaming
|
||||
private static readonly Action<ILogger, string, Exception> _streamItemOnNonStreamInvocation =
|
||||
LoggerMessage.Define<string>(LogLevel.Error, new EventId(5, "StreamItemOnNonStreamInvocation"), "Invocation {invocationId} received stream item but was invoked as a non-streamed invocation.");
|
||||
LoggerMessage.Define<string>(LogLevel.Error, new EventId(5, "StreamItemOnNonStreamInvocation"), "Invocation {InvocationId} received stream item but was invoked as a non-streamed invocation.");
|
||||
|
||||
public static void InvocationCreated(ILogger logger, string invocationId)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -258,7 +258,7 @@ namespace Microsoft.AspNetCore.SignalR
|
|||
{
|
||||
// Category: HubConnectionContext
|
||||
private static readonly Action<ILogger, string, Exception> _usingHubProtocol =
|
||||
LoggerMessage.Define<string>(LogLevel.Information, new EventId(1, "UsingHubProtocol"), "Using HubProtocol '{protocol}'.");
|
||||
LoggerMessage.Define<string>(LogLevel.Information, new EventId(1, "UsingHubProtocol"), "Using HubProtocol '{Protocol}'.");
|
||||
|
||||
private static readonly Action<ILogger, Exception> _negotiateCanceled =
|
||||
LoggerMessage.Define(LogLevel.Debug, new EventId(2, "NegotiateCanceled"), "Negotiate was canceled.");
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ namespace Microsoft.AspNetCore.SignalR
|
|||
private static class Log
|
||||
{
|
||||
private static readonly Action<ILogger, string, Exception> _errorDispatchingHubEvent =
|
||||
LoggerMessage.Define<string>(LogLevel.Error, new EventId(1, "ErrorDispatchingHubEvent"), "Error when dispatching '{hubMethod}' on hub.");
|
||||
LoggerMessage.Define<string>(LogLevel.Error, new EventId(1, "ErrorDispatchingHubEvent"), "Error when dispatching '{HubMethod}' on hub.");
|
||||
|
||||
private static readonly Action<ILogger, Exception> _errorProcessingRequest =
|
||||
LoggerMessage.Define(LogLevel.Error, new EventId(2, "ErrorProcessingRequest"), "Error when processing requests.");
|
||||
|
|
|
|||
|
|
@ -13,49 +13,49 @@ namespace Microsoft.AspNetCore.SignalR.Internal
|
|||
private static class Log
|
||||
{
|
||||
private static readonly Action<ILogger, InvocationMessage, Exception> _receivedHubInvocation =
|
||||
LoggerMessage.Define<InvocationMessage>(LogLevel.Debug, new EventId(1, "ReceivedHubInvocation"), "Received hub invocation: {invocationMessage}.");
|
||||
LoggerMessage.Define<InvocationMessage>(LogLevel.Debug, new EventId(1, "ReceivedHubInvocation"), "Received hub invocation: {InvocationMessage}.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _unsupportedMessageReceived =
|
||||
LoggerMessage.Define<string>(LogLevel.Error, new EventId(2, "UnsupportedMessageReceived"), "Received unsupported message of type '{messageType}'.");
|
||||
LoggerMessage.Define<string>(LogLevel.Error, new EventId(2, "UnsupportedMessageReceived"), "Received unsupported message of type '{MessageType}'.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _unknownHubMethod =
|
||||
LoggerMessage.Define<string>(LogLevel.Error, new EventId(3, "UnknownHubMethod"), "Unknown hub method '{hubMethod}'.");
|
||||
LoggerMessage.Define<string>(LogLevel.Error, new EventId(3, "UnknownHubMethod"), "Unknown hub method '{HubMethod}'.");
|
||||
|
||||
private static readonly Action<ILogger, Exception> _outboundChannelClosed =
|
||||
LoggerMessage.Define(LogLevel.Warning, new EventId(4, "OutboundChannelClosed"), "Outbound channel was closed while trying to write hub message.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _hubMethodNotAuthorized =
|
||||
LoggerMessage.Define<string>(LogLevel.Debug, new EventId(5, "HubMethodNotAuthorized"), "Failed to invoke '{hubMethod}' because user is unauthorized.");
|
||||
LoggerMessage.Define<string>(LogLevel.Debug, new EventId(5, "HubMethodNotAuthorized"), "Failed to invoke '{HubMethod}' because user is unauthorized.");
|
||||
|
||||
private static readonly Action<ILogger, string, string, Exception> _streamingResult =
|
||||
LoggerMessage.Define<string, string>(LogLevel.Trace, new EventId(6, "StreamingResult"), "InvocationId {invocationId}: Streaming result of type '{resultType}'.");
|
||||
LoggerMessage.Define<string, string>(LogLevel.Trace, new EventId(6, "StreamingResult"), "InvocationId {InvocationId}: Streaming result of type '{ResultType}'.");
|
||||
|
||||
private static readonly Action<ILogger, string, string, Exception> _sendingResult =
|
||||
LoggerMessage.Define<string, string>(LogLevel.Trace, new EventId(7, "SendingResult"), "InvocationId {invocationId}: Sending result of type '{resultType}'.");
|
||||
LoggerMessage.Define<string, string>(LogLevel.Trace, new EventId(7, "SendingResult"), "InvocationId {InvocationId}: Sending result of type '{ResultType}'.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _failedInvokingHubMethod =
|
||||
LoggerMessage.Define<string>(LogLevel.Error, new EventId(8, "FailedInvokingHubMethod"), "Failed to invoke hub method '{hubMethod}'.");
|
||||
LoggerMessage.Define<string>(LogLevel.Error, new EventId(8, "FailedInvokingHubMethod"), "Failed to invoke hub method '{HubMethod}'.");
|
||||
|
||||
private static readonly Action<ILogger, string, string, Exception> _hubMethodBound =
|
||||
LoggerMessage.Define<string, string>(LogLevel.Trace, new EventId(9, "HubMethodBound"), "'{hubName}' hub method '{hubMethod}' is bound.");
|
||||
LoggerMessage.Define<string, string>(LogLevel.Trace, new EventId(9, "HubMethodBound"), "'{HubName}' hub method '{HubMethod}' is bound.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _cancelStream =
|
||||
LoggerMessage.Define<string>(LogLevel.Debug, new EventId(10, "CancelStream"), "Canceling stream for invocation {invocationId}.");
|
||||
LoggerMessage.Define<string>(LogLevel.Debug, new EventId(10, "CancelStream"), "Canceling stream for invocation {InvocationId}.");
|
||||
|
||||
private static readonly Action<ILogger, Exception> _unexpectedCancel =
|
||||
LoggerMessage.Define(LogLevel.Debug, new EventId(11, "UnexpectedCancel"), "CancelInvocationMessage received unexpectedly.");
|
||||
|
||||
private static readonly Action<ILogger, StreamInvocationMessage, Exception> _receivedStreamHubInvocation =
|
||||
LoggerMessage.Define<StreamInvocationMessage>(LogLevel.Debug, new EventId(12, "ReceivedStreamHubInvocation"), "Received stream hub invocation: {invocationMessage}.");
|
||||
LoggerMessage.Define<StreamInvocationMessage>(LogLevel.Debug, new EventId(12, "ReceivedStreamHubInvocation"), "Received stream hub invocation: {InvocationMessage}.");
|
||||
|
||||
private static readonly Action<ILogger, HubMethodInvocationMessage, Exception> _streamingMethodCalledWithInvoke =
|
||||
LoggerMessage.Define<HubMethodInvocationMessage>(LogLevel.Error, new EventId(13, "StreamingMethodCalledWithInvoke"), "A streaming method was invoked in the non-streaming fashion : {invocationMessage}.");
|
||||
LoggerMessage.Define<HubMethodInvocationMessage>(LogLevel.Error, new EventId(13, "StreamingMethodCalledWithInvoke"), "A streaming method was invoked in the non-streaming fashion : {InvocationMessage}.");
|
||||
|
||||
private static readonly Action<ILogger, HubMethodInvocationMessage, Exception> _nonStreamingMethodCalledWithStream =
|
||||
LoggerMessage.Define<HubMethodInvocationMessage>(LogLevel.Error, new EventId(14, "NonStreamingMethodCalledWithStream"), "A non-streaming method was invoked in the streaming fashion : {invocationMessage}.");
|
||||
LoggerMessage.Define<HubMethodInvocationMessage>(LogLevel.Error, new EventId(14, "NonStreamingMethodCalledWithStream"), "A non-streaming method was invoked in the streaming fashion : {InvocationMessage}.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _invalidReturnValueFromStreamingMethod =
|
||||
LoggerMessage.Define<string>(LogLevel.Error, new EventId(15, "InvalidReturnValueFromStreamingMethod"), "A streaming method returned a value that cannot be used to build enumerator {hubMethod}.");
|
||||
LoggerMessage.Define<string>(LogLevel.Error, new EventId(15, "InvalidReturnValueFromStreamingMethod"), "A streaming method returned a value that cannot be used to build enumerator {HubMethod}.");
|
||||
|
||||
public static void ReceivedHubInvocation(ILogger logger, InvocationMessage invocationMessage)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -12,22 +12,22 @@ namespace Microsoft.AspNetCore.SignalR.Redis.Internal
|
|||
{
|
||||
// Category: RedisHubLifetimeManager<THub>
|
||||
private static readonly Action<ILogger, string, Exception> _connectingToEndpoints =
|
||||
LoggerMessage.Define<string>(LogLevel.Information, new EventId(1, nameof(ConnectingToEndpoints)), "Connecting to Redis endpoints: {endpoints}.");
|
||||
LoggerMessage.Define<string>(LogLevel.Information, new EventId(1, nameof(ConnectingToEndpoints)), "Connecting to Redis endpoints: {Endpoints}.");
|
||||
|
||||
private static readonly Action<ILogger, Exception> _connected =
|
||||
LoggerMessage.Define(LogLevel.Information, new EventId(2, nameof(Connected)), "Connected to Redis.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _subscribing =
|
||||
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(3, nameof(Subscribing)), "Subscribing to channel: {channel}.");
|
||||
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(3, nameof(Subscribing)), "Subscribing to channel: {Channel}.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _receivedFromChannel =
|
||||
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(4, nameof(ReceivedFromChannel)), "Received message from Redis channel {channel}.");
|
||||
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(4, nameof(ReceivedFromChannel)), "Received message from Redis channel {Channel}.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _publishToChannel =
|
||||
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(5, nameof(PublishToChannel)), "Publishing message to Redis channel {channel}.");
|
||||
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(5, nameof(PublishToChannel)), "Publishing message to Redis channel {Channel}.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _unsubscribe =
|
||||
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(6, nameof(Unsubscribe)), "Unsubscribing from channel: {channel}.");
|
||||
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(6, nameof(Unsubscribe)), "Unsubscribing from channel: {Channel}.");
|
||||
|
||||
private static readonly Action<ILogger, Exception> _notConnected =
|
||||
LoggerMessage.Define(LogLevel.Warning, new EventId(7, nameof(Connected)), "Not connected to Redis.");
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ namespace Microsoft.AspNetCore.Sockets.Client
|
|||
LoggerMessage.Define(LogLevel.Debug, new EventId(2, "HttpConnectionClosed"), "Connection was closed from a different thread.");
|
||||
|
||||
private static readonly Action<ILogger, string, Uri, Exception> _startingTransport =
|
||||
LoggerMessage.Define<string, Uri>(LogLevel.Debug, new EventId(3, "StartingTransport"), "Starting transport '{transport}' with Url: {url}.");
|
||||
LoggerMessage.Define<string, Uri>(LogLevel.Debug, new EventId(3, "StartingTransport"), "Starting transport '{Transport}' with Url: {Url}.");
|
||||
|
||||
private static readonly Action<ILogger, Exception> _processRemainingMessages =
|
||||
LoggerMessage.Define(LogLevel.Debug, new EventId(4, "ProcessRemainingMessages"), "Ensuring all outstanding messages are processed.");
|
||||
|
|
@ -30,13 +30,13 @@ namespace Microsoft.AspNetCore.Sockets.Client
|
|||
LoggerMessage.Define(LogLevel.Debug, new EventId(6, "CompleteClosed"), "Completing Closed task.");
|
||||
|
||||
private static readonly Action<ILogger, Uri, Exception> _establishingConnection =
|
||||
LoggerMessage.Define<Uri>(LogLevel.Debug, new EventId(7, "EstablishingConnection"), "Establishing Connection at: {url}.");
|
||||
LoggerMessage.Define<Uri>(LogLevel.Debug, new EventId(7, "EstablishingConnection"), "Establishing Connection at: {Url}.");
|
||||
|
||||
private static readonly Action<ILogger, Uri, Exception> _errorWithNegotiation =
|
||||
LoggerMessage.Define<Uri>(LogLevel.Error, new EventId(8, "ErrorWithNegotiation"), "Failed to start connection. Error getting negotiation response from '{url}'.");
|
||||
LoggerMessage.Define<Uri>(LogLevel.Error, new EventId(8, "ErrorWithNegotiation"), "Failed to start connection. Error getting negotiation response from '{Url}'.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _errorStartingTransport =
|
||||
LoggerMessage.Define<string>(LogLevel.Error, new EventId(9, "ErrorStartingTransport"), "Failed to start connection. Error starting transport '{transport}'.");
|
||||
LoggerMessage.Define<string>(LogLevel.Error, new EventId(9, "ErrorStartingTransport"), "Failed to start connection. Error starting transport '{Transport}'.");
|
||||
|
||||
private static readonly Action<ILogger, Exception> _httpReceiveStarted =
|
||||
LoggerMessage.Define(LogLevel.Trace, new EventId(10, "HttpReceiveStarted"), "Beginning receive loop.");
|
||||
|
|
@ -66,7 +66,7 @@ namespace Microsoft.AspNetCore.Sockets.Client
|
|||
LoggerMessage.Define(LogLevel.Information, new EventId(18, "StoppingClient"), "Stopping client.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _exceptionThrownFromCallback =
|
||||
LoggerMessage.Define<string>(LogLevel.Error, new EventId(19, "ExceptionThrownFromCallback"), "An exception was thrown from the '{callback}' callback.");
|
||||
LoggerMessage.Define<string>(LogLevel.Error, new EventId(19, "ExceptionThrownFromCallback"), "An exception was thrown from the '{Callback}' callback.");
|
||||
|
||||
private static readonly Action<ILogger, Exception> _disposingClient =
|
||||
LoggerMessage.Define(LogLevel.Information, new EventId(20, "DisposingClient"), "Disposing client.");
|
||||
|
|
@ -84,19 +84,19 @@ namespace Microsoft.AspNetCore.Sockets.Client
|
|||
LoggerMessage.Define(LogLevel.Debug, new EventId(24, "SkippingDispose"), "Skipping dispose, connection is already disposed.");
|
||||
|
||||
private static readonly Action<ILogger, string, string, Exception> _connectionStateChanged =
|
||||
LoggerMessage.Define<string, string>(LogLevel.Debug, new EventId(25, "ConnectionStateChanged"), "Connection state changed from {previousState} to {newState}.");
|
||||
LoggerMessage.Define<string, string>(LogLevel.Debug, new EventId(25, "ConnectionStateChanged"), "Connection state changed from {PreviousState} to {NewState}.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _transportNotSupported =
|
||||
LoggerMessage.Define<string>(LogLevel.Debug, new EventId(26, "TransportNotSupported"), "Skipping transport {transportName} because it is not supported by this client.");
|
||||
LoggerMessage.Define<string>(LogLevel.Debug, new EventId(26, "TransportNotSupported"), "Skipping transport {TransportName} because it is not supported by this client.");
|
||||
|
||||
private static readonly Action<ILogger, string, string, Exception> _transportDoesNotSupportTransferFormat =
|
||||
LoggerMessage.Define<string, string>(LogLevel.Debug, new EventId(27, "TransportDoesNotSupportTransferFormat"), "Skipping transport {transportName} because it does not support the requested transfer format '{transferFormat}'.");
|
||||
LoggerMessage.Define<string, string>(LogLevel.Debug, new EventId(27, "TransportDoesNotSupportTransferFormat"), "Skipping transport {TransportName} because it does not support the requested transfer format '{TransferFormat}'.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _transportDisabledByClient =
|
||||
LoggerMessage.Define<string>(LogLevel.Debug, new EventId(28, "TransportDisabledByClient"), "Skipping transport {transportName} because it was disabled by the client.");
|
||||
LoggerMessage.Define<string>(LogLevel.Debug, new EventId(28, "TransportDisabledByClient"), "Skipping transport {TransportName} because it was disabled by the client.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _transportFailed =
|
||||
LoggerMessage.Define<string>(LogLevel.Debug, new EventId(29, "TransportFailed"), "Skipping transport {transportName} because it failed to initialize.");
|
||||
LoggerMessage.Define<string>(LogLevel.Debug, new EventId(29, "TransportFailed"), "Skipping transport {TransportName} because it failed to initialize.");
|
||||
|
||||
public static void HttpConnectionStarting(ILogger logger)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace Microsoft.AspNetCore.Sockets.Client
|
|||
private static class Log
|
||||
{
|
||||
private static readonly Action<ILogger, TransferFormat, Exception> _startTransport =
|
||||
LoggerMessage.Define<TransferFormat>(LogLevel.Information, new EventId(1, "StartTransport"), "Starting transport. Transfer mode: {transferFormat}.");
|
||||
LoggerMessage.Define<TransferFormat>(LogLevel.Information, new EventId(1, "StartTransport"), "Starting transport. Transfer mode: {TransferFormat}.");
|
||||
|
||||
private static readonly Action<ILogger, Exception> _transportStopped =
|
||||
LoggerMessage.Define(LogLevel.Debug, new EventId(2, "TransportStopped"), "Transport stopped.");
|
||||
|
|
@ -36,7 +36,7 @@ namespace Microsoft.AspNetCore.Sockets.Client
|
|||
LoggerMessage.Define(LogLevel.Debug, new EventId(8, "ReceivedMessages"), "Received messages from the server.");
|
||||
|
||||
private static readonly Action<ILogger, Uri, Exception> _errorPolling =
|
||||
LoggerMessage.Define<Uri>(LogLevel.Error, new EventId(9, "ErrorPolling"), "Error while polling '{pollUrl}'.");
|
||||
LoggerMessage.Define<Uri>(LogLevel.Error, new EventId(9, "ErrorPolling"), "Error while polling '{PollUrl}'.");
|
||||
|
||||
// EventIds 100 - 106 used in SendUtils
|
||||
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ namespace Microsoft.AspNetCore.Sockets.Client
|
|||
LoggerMessage.Define(LogLevel.Debug, new EventId(102, "SendCanceled"), "Send loop canceled.");
|
||||
|
||||
private static readonly Action<ILogger, long, Uri, Exception> _sendingMessages =
|
||||
LoggerMessage.Define<long, Uri>(LogLevel.Debug, new EventId(103, "SendingMessages"), "Sending {count} bytes to the server using url: {url}.");
|
||||
LoggerMessage.Define<long, Uri>(LogLevel.Debug, new EventId(103, "SendingMessages"), "Sending {Count} bytes to the server using url: {Url}.");
|
||||
|
||||
private static readonly Action<ILogger, Exception> _sentSuccessfully =
|
||||
LoggerMessage.Define(LogLevel.Debug, new EventId(104, "SentSuccessfully"), "Message(s) sent successfully.");
|
||||
|
|
@ -142,7 +142,7 @@ namespace Microsoft.AspNetCore.Sockets.Client
|
|||
LoggerMessage.Define(LogLevel.Debug, new EventId(105, "NoMessages"), "No messages in batch to send.");
|
||||
|
||||
private static readonly Action<ILogger, Uri, Exception> _errorSending =
|
||||
LoggerMessage.Define<Uri>(LogLevel.Error, new EventId(106, "ErrorSending"), "Error while sending to '{url}'.");
|
||||
LoggerMessage.Define<Uri>(LogLevel.Error, new EventId(106, "ErrorSending"), "Error while sending to '{Url}'.");
|
||||
|
||||
// When adding a new log message make sure to check with LongPollingTransport and ServerSentEventsTransport that share these logs to not have conflicting EventIds
|
||||
// We start the IDs at 100 to make it easy to avoid conflicting IDs
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace Microsoft.AspNetCore.Sockets.Client
|
|||
private static class Log
|
||||
{
|
||||
private static readonly Action<ILogger, TransferFormat, Exception> _startTransport =
|
||||
LoggerMessage.Define<TransferFormat>(LogLevel.Information, new EventId(1, "StartTransport"), "Starting transport. Transfer mode: {transferFormat}.");
|
||||
LoggerMessage.Define<TransferFormat>(LogLevel.Information, new EventId(1, "StartTransport"), "Starting transport. Transfer mode: {TransferFormat}.");
|
||||
|
||||
private static readonly Action<ILogger, Exception> _transportStopped =
|
||||
LoggerMessage.Define(LogLevel.Debug, new EventId(2, "TransportStopped"), "Transport stopped.");
|
||||
|
|
@ -30,13 +30,13 @@ namespace Microsoft.AspNetCore.Sockets.Client
|
|||
LoggerMessage.Define(LogLevel.Information, new EventId(6, "TransportStopping"), "Transport is stopping.");
|
||||
|
||||
private static readonly Action<ILogger, int, Exception> _messageToApp =
|
||||
LoggerMessage.Define<int>(LogLevel.Debug, new EventId(7, "MessageToApp"), "Passing message to application. Payload size: {count}.");
|
||||
LoggerMessage.Define<int>(LogLevel.Debug, new EventId(7, "MessageToApp"), "Passing message to application. Payload size: {Count}.");
|
||||
|
||||
private static readonly Action<ILogger, Exception> _eventStreamEnded =
|
||||
LoggerMessage.Define(LogLevel.Debug, new EventId(8, "EventStreamEnded"), "Server-Sent Event Stream ended.");
|
||||
|
||||
private static readonly Action<ILogger, long, Exception> _parsingSSE =
|
||||
LoggerMessage.Define<long>(LogLevel.Debug, new EventId(9, "ParsingSSE"), "Received {count} bytes. Parsing SSE frame.");
|
||||
LoggerMessage.Define<long>(LogLevel.Debug, new EventId(9, "ParsingSSE"), "Received {Count} bytes. Parsing SSE frame.");
|
||||
|
||||
// EventIds 100 - 106 used in SendUtils
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace Microsoft.AspNetCore.Sockets.Client
|
|||
private static class Log
|
||||
{
|
||||
private static readonly Action<ILogger, TransferFormat, Exception> _startTransport =
|
||||
LoggerMessage.Define<TransferFormat>(LogLevel.Information, new EventId(1, "StartTransport"), "Starting transport. Transfer mode: {transferFormat}.");
|
||||
LoggerMessage.Define<TransferFormat>(LogLevel.Information, new EventId(1, "StartTransport"), "Starting transport. Transfer mode: {TransferFormat}.");
|
||||
|
||||
private static readonly Action<ILogger, Exception> _transportStopped =
|
||||
LoggerMessage.Define(LogLevel.Debug, new EventId(2, "TransportStopped"), "Transport stopped.");
|
||||
|
|
@ -40,16 +40,16 @@ namespace Microsoft.AspNetCore.Sockets.Client
|
|||
LoggerMessage.Define(LogLevel.Debug, new EventId(9, "SendCanceled"), "Send loop canceled.");
|
||||
|
||||
private static readonly Action<ILogger, int, Exception> _messageToApp =
|
||||
LoggerMessage.Define<int>(LogLevel.Debug, new EventId(10, "MessageToApp"), "Passing message to application. Payload size: {count}.");
|
||||
LoggerMessage.Define<int>(LogLevel.Debug, new EventId(10, "MessageToApp"), "Passing message to application. Payload size: {Count}.");
|
||||
|
||||
private static readonly Action<ILogger, WebSocketCloseStatus?, Exception> _webSocketClosed =
|
||||
LoggerMessage.Define<WebSocketCloseStatus?>(LogLevel.Information, new EventId(11, "WebSocketClosed"), "Websocket closed by the server. Close status {closeStatus}.");
|
||||
LoggerMessage.Define<WebSocketCloseStatus?>(LogLevel.Information, new EventId(11, "WebSocketClosed"), "Websocket closed by the server. Close status {CloseStatus}.");
|
||||
|
||||
private static readonly Action<ILogger, WebSocketMessageType, int, bool, Exception> _messageReceived =
|
||||
LoggerMessage.Define<WebSocketMessageType, int, bool>(LogLevel.Debug, new EventId(12, "MessageReceived"), "Message received. Type: {messageType}, size: {count}, EndOfMessage: {endOfMessage}.");
|
||||
LoggerMessage.Define<WebSocketMessageType, int, bool>(LogLevel.Debug, new EventId(12, "MessageReceived"), "Message received. Type: {MessageType}, size: {Count}, EndOfMessage: {EndOfMessage}.");
|
||||
|
||||
private static readonly Action<ILogger, long, Exception> _receivedFromApp =
|
||||
LoggerMessage.Define<long>(LogLevel.Debug, new EventId(13, "ReceivedFromApp"), "Received message from application. Payload size: {count}.");
|
||||
LoggerMessage.Define<long>(LogLevel.Debug, new EventId(13, "ReceivedFromApp"), "Received message from application. Payload size: {Count}.");
|
||||
|
||||
private static readonly Action<ILogger, Exception> _sendMessageCanceled =
|
||||
LoggerMessage.Define(LogLevel.Information, new EventId(14, "SendMessageCanceled"), "Sending a message canceled.");
|
||||
|
|
|
|||
|
|
@ -11,13 +11,13 @@ namespace Microsoft.AspNetCore.Sockets
|
|||
private static class Log
|
||||
{
|
||||
private static readonly Action<ILogger, string, Exception> _connectionDisposed =
|
||||
LoggerMessage.Define<string>(LogLevel.Debug, new EventId(1, "ConnectionDisposed"), "Connection Id {connectionId} was disposed.");
|
||||
LoggerMessage.Define<string>(LogLevel.Debug, new EventId(1, "ConnectionDisposed"), "Connection Id {SocketsConnectionId} was disposed.");
|
||||
|
||||
private static readonly Action<ILogger, string, string, Exception> _connectionAlreadyActive =
|
||||
LoggerMessage.Define<string, string>(LogLevel.Debug, new EventId(2, "ConnectionAlreadyActive"), "Connection Id {connectionId} is already active via {requestId}.");
|
||||
LoggerMessage.Define<string, string>(LogLevel.Debug, new EventId(2, "ConnectionAlreadyActive"), "Connection Id {SocketsConnectionId} is already active via {RequestId}.");
|
||||
|
||||
private static readonly Action<ILogger, string, string, Exception> _pollCanceled =
|
||||
LoggerMessage.Define<string, string>(LogLevel.Trace, new EventId(3, "PollCanceled"), "Previous poll canceled for {connectionId} on {requestId}.");
|
||||
LoggerMessage.Define<string, string>(LogLevel.Trace, new EventId(3, "PollCanceled"), "Previous poll canceled for {SocketsConnectionId} on {RequestId}.");
|
||||
|
||||
private static readonly Action<ILogger, Exception> _establishedConnection =
|
||||
LoggerMessage.Define(LogLevel.Debug, new EventId(4, "EstablishedConnection"), "Establishing new connection.");
|
||||
|
|
@ -26,13 +26,13 @@ namespace Microsoft.AspNetCore.Sockets
|
|||
LoggerMessage.Define(LogLevel.Debug, new EventId(5, "ResumingConnection"), "Resuming existing connection.");
|
||||
|
||||
private static readonly Action<ILogger, long, Exception> _receivedBytes =
|
||||
LoggerMessage.Define<long>(LogLevel.Trace, new EventId(6, "ReceivedBytes"), "Received {count} bytes.");
|
||||
LoggerMessage.Define<long>(LogLevel.Trace, new EventId(6, "ReceivedBytes"), "Received {Count} bytes.");
|
||||
|
||||
private static readonly Action<ILogger, TransportType, Exception> _transportNotSupported =
|
||||
LoggerMessage.Define<TransportType>(LogLevel.Debug, new EventId(7, "TransportNotSupported"), "{transportType} transport not supported by this endpoint type.");
|
||||
LoggerMessage.Define<TransportType>(LogLevel.Debug, new EventId(7, "TransportNotSupported"), "{TransportType} transport not supported by this endpoint type.");
|
||||
|
||||
private static readonly Action<ILogger, TransportType, TransportType, Exception> _cannotChangeTransport =
|
||||
LoggerMessage.Define<TransportType, TransportType>(LogLevel.Error, new EventId(8, "CannotChangeTransport"), "Cannot change transports mid-connection; currently using {transportType}, requesting {requestedTransport}.");
|
||||
LoggerMessage.Define<TransportType, TransportType>(LogLevel.Error, new EventId(8, "CannotChangeTransport"), "Cannot change transports mid-connection; currently using {TransportType}, requesting {RequestedTransport}.");
|
||||
|
||||
private static readonly Action<ILogger, Exception> _postNotallowedForWebsockets =
|
||||
LoggerMessage.Define(LogLevel.Debug, new EventId(9, "PostNotAllowedForWebSockets"), "POST requests are not allowed for websocket connections.");
|
||||
|
|
|
|||
|
|
@ -10,25 +10,25 @@ namespace Microsoft.AspNetCore.Sockets.Internal
|
|||
{
|
||||
// Category: ConnectionManager
|
||||
private static readonly Action<ILogger, string, Exception> _createdNewConnection =
|
||||
LoggerMessage.Define<string>(LogLevel.Debug, new EventId(1, nameof(CreatedNewConnection)), "New connection {connectionId} created.");
|
||||
LoggerMessage.Define<string>(LogLevel.Debug, new EventId(1, nameof(CreatedNewConnection)), "New connection {SocketsConnectionId} created.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _removedConnection =
|
||||
LoggerMessage.Define<string>(LogLevel.Debug, new EventId(2, nameof(RemovedConnection)), "Removing connection {connectionId} from the list of connections.");
|
||||
LoggerMessage.Define<string>(LogLevel.Debug, new EventId(2, nameof(RemovedConnection)), "Removing connection {SocketsConnectionId} from the list of connections.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _failedDispose =
|
||||
LoggerMessage.Define<string>(LogLevel.Error, new EventId(3, nameof(FailedDispose)), "Failed disposing connection {connectionId}.");
|
||||
LoggerMessage.Define<string>(LogLevel.Error, new EventId(3, nameof(FailedDispose)), "Failed disposing connection {SocketsConnectionId}.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _connectionReset =
|
||||
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(4, nameof(ConnectionReset)), "Connection {connectionId} was reset.");
|
||||
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(4, nameof(ConnectionReset)), "Connection {SocketsConnectionId} was reset.");
|
||||
|
||||
private static readonly Action<ILogger, string, Exception> _connectionTimedOut =
|
||||
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(5, nameof(ConnectionTimedOut)), "Connection {connectionId} timed out.");
|
||||
LoggerMessage.Define<string>(LogLevel.Trace, new EventId(5, nameof(ConnectionTimedOut)), "Connection {SocketsConnectionId} timed out.");
|
||||
|
||||
private static readonly Action<ILogger, Exception> _scanningConnections =
|
||||
LoggerMessage.Define(LogLevel.Trace, new EventId(6, nameof(ScanningConnections)), "Scanning connections.");
|
||||
|
||||
private static readonly Action<ILogger, TimeSpan, Exception> _scannedConnections =
|
||||
LoggerMessage.Define<TimeSpan>(LogLevel.Trace, new EventId(7, nameof(ScannedConnections)), "Scanned connections in {duration}.");
|
||||
LoggerMessage.Define<TimeSpan>(LogLevel.Trace, new EventId(7, nameof(ScannedConnections)), "Scanned connections in {Duration}.");
|
||||
|
||||
public static void CreatedNewConnection(this ILogger logger, string connectionId)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ namespace Microsoft.AspNetCore.Sockets.Internal.Transports
|
|||
LoggerMessage.Define(LogLevel.Debug, new EventId(2, "PollTimedOut"), "Poll request timed out. Sending 200 response to connection.");
|
||||
|
||||
private static readonly Action<ILogger, long, Exception> _longPollingWritingMessage =
|
||||
LoggerMessage.Define<long>(LogLevel.Trace, new EventId(3, "LongPollingWritingMessage"), "Writing a {count} byte message to connection.");
|
||||
LoggerMessage.Define<long>(LogLevel.Trace, new EventId(3, "LongPollingWritingMessage"), "Writing a {Count} byte message to connection.");
|
||||
|
||||
private static readonly Action<ILogger, Exception> _longPollingDisconnected =
|
||||
LoggerMessage.Define(LogLevel.Debug, new EventId(4, "LongPollingDisconnected"), "Client disconnected from Long Polling endpoint for connection.");
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ namespace Microsoft.AspNetCore.Sockets.Internal.Transports
|
|||
private static class Log
|
||||
{
|
||||
private static readonly Action<ILogger, long, Exception> _sseWritingMessage =
|
||||
LoggerMessage.Define<long>(LogLevel.Trace, new EventId(1, "SSEWritingMessage"), "Writing a {count} byte message.");
|
||||
LoggerMessage.Define<long>(LogLevel.Trace, new EventId(1, "SSEWritingMessage"), "Writing a {Count} byte message.");
|
||||
|
||||
public static void SSEWritingMessage(ILogger logger, long count)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ namespace Microsoft.AspNetCore.Sockets.Internal.Transports
|
|||
LoggerMessage.Define(LogLevel.Debug, new EventId(2, "SocketClosed"), "Socket closed.");
|
||||
|
||||
private static readonly Action<ILogger, WebSocketCloseStatus?, string, Exception> _clientClosed =
|
||||
LoggerMessage.Define<WebSocketCloseStatus?, string>(LogLevel.Debug, new EventId(3, "ClientClosed"), "Client closed connection with status code '{status}' ({description}). Signaling end-of-input to application.");
|
||||
LoggerMessage.Define<WebSocketCloseStatus?, string>(LogLevel.Debug, new EventId(3, "ClientClosed"), "Client closed connection with status code '{Status}' ({Description}). Signaling end-of-input to application.");
|
||||
|
||||
private static readonly Action<ILogger, Exception> _waitingForSend =
|
||||
LoggerMessage.Define(LogLevel.Debug, new EventId(4, "WaitingForSend"), "Waiting for the application to finish sending data.");
|
||||
|
|
@ -36,13 +36,13 @@ namespace Microsoft.AspNetCore.Sockets.Internal.Transports
|
|||
LoggerMessage.Define(LogLevel.Debug, new EventId(8, "CloseTimedOut"), "Timed out waiting for client to send the close frame, aborting the connection.");
|
||||
|
||||
private static readonly Action<ILogger, WebSocketMessageType, int, bool, Exception> _messageReceived =
|
||||
LoggerMessage.Define<WebSocketMessageType, int, bool>(LogLevel.Trace, new EventId(9, "MessageReceived"), "Message received. Type: {messageType}, size: {size}, EndOfMessage: {endOfMessage}.");
|
||||
LoggerMessage.Define<WebSocketMessageType, int, bool>(LogLevel.Trace, new EventId(9, "MessageReceived"), "Message received. Type: {MessageType}, size: {Size}, EndOfMessage: {EndOfMessage}.");
|
||||
|
||||
private static readonly Action<ILogger, int, Exception> _messageToApplication =
|
||||
LoggerMessage.Define<int>(LogLevel.Trace, new EventId(10, "MessageToApplication"), "Passing message to application. Payload size: {size}.");
|
||||
LoggerMessage.Define<int>(LogLevel.Trace, new EventId(10, "MessageToApplication"), "Passing message to application. Payload size: {Size}.");
|
||||
|
||||
private static readonly Action<ILogger, long, Exception> _sendPayload =
|
||||
LoggerMessage.Define<long>(LogLevel.Trace, new EventId(11, "SendPayload"), "Sending payload: {size} bytes.");
|
||||
LoggerMessage.Define<long>(LogLevel.Trace, new EventId(11, "SendPayload"), "Sending payload: {Size} bytes.");
|
||||
|
||||
private static readonly Action<ILogger, Exception> _errorWritingFrame =
|
||||
LoggerMessage.Define(LogLevel.Error, new EventId(12, "ErrorWritingFrame"), "Error writing frame.");
|
||||
|
|
|
|||
Loading…
Reference in New Issue