diff --git a/src/Microsoft.AspNetCore.SignalR.Client.Core/Internal/SignalRClientLoggerExtensions.cs b/src/Microsoft.AspNetCore.SignalR.Client.Core/Internal/SignalRClientLoggerExtensions.cs index 6371a949b0..cc959acf6b 100644 --- a/src/Microsoft.AspNetCore.SignalR.Client.Core/Internal/SignalRClientLoggerExtensions.cs +++ b/src/Microsoft.AspNetCore.SignalR.Client.Core/Internal/SignalRClientLoggerExtensions.cs @@ -11,112 +11,112 @@ namespace Microsoft.AspNetCore.SignalR.Client.Internal { // Category: HubConnection private static readonly Action _preparingNonBlockingInvocation = - LoggerMessage.Define(LogLevel.Trace, new EventId(0, nameof(PreparingNonBlockingInvocation)), "Preparing non-blocking invocation '{invocationId}' of '{target}', with {argumentCount} argument(s)."); + LoggerMessage.Define(LogLevel.Trace, new EventId(1, nameof(PreparingNonBlockingInvocation)), "Preparing non-blocking invocation '{invocationId}' of '{target}', with {argumentCount} argument(s)."); private static readonly Action _preparingBlockingInvocation = - LoggerMessage.Define(LogLevel.Trace, new EventId(1, nameof(PreparingBlockingInvocation)), "Preparing blocking invocation '{invocationId}' of '{target}', with return type '{returnType}' and {argumentCount} argument(s)."); + LoggerMessage.Define(LogLevel.Trace, new EventId(2, nameof(PreparingBlockingInvocation)), "Preparing blocking invocation '{invocationId}' of '{target}', with return type '{returnType}' and {argumentCount} argument(s)."); private static readonly Action _registerInvocation = - LoggerMessage.Define(LogLevel.Debug, new EventId(2, nameof(RegisterInvocation)), "Registering Invocation ID '{invocationId}' for tracking."); + LoggerMessage.Define(LogLevel.Debug, new EventId(3, nameof(RegisterInvocation)), "Registering Invocation ID '{invocationId}' for tracking."); private static readonly Action _issueInvocation = - LoggerMessage.Define(LogLevel.Trace, new EventId(3, nameof(IssueInvocation)), "Issuing Invocation '{invocationId}': {returnType} {methodName}({args})."); + LoggerMessage.Define(LogLevel.Trace, new EventId(4, nameof(IssueInvocation)), "Issuing Invocation '{invocationId}': {returnType} {methodName}({args})."); private static readonly Action _sendInvocation = - LoggerMessage.Define(LogLevel.Debug, new EventId(4, nameof(SendInvocation)), "Sending Invocation '{invocationId}'."); + LoggerMessage.Define(LogLevel.Debug, new EventId(5, nameof(SendInvocation)), "Sending Invocation '{invocationId}'."); private static readonly Action _sendInvocationCompleted = - LoggerMessage.Define(LogLevel.Debug, new EventId(5, nameof(SendInvocationCompleted)), "Sending Invocation '{invocationId}' completed."); + LoggerMessage.Define(LogLevel.Debug, new EventId(6, nameof(SendInvocationCompleted)), "Sending Invocation '{invocationId}' completed."); private static readonly Action _sendInvocationFailed = - LoggerMessage.Define(LogLevel.Error, new EventId(6, nameof(SendInvocationFailed)), "Sending Invocation '{invocationId}' failed."); + LoggerMessage.Define(LogLevel.Error, new EventId(7, nameof(SendInvocationFailed)), "Sending Invocation '{invocationId}' failed."); private static readonly Action _receivedInvocation = - LoggerMessage.Define(LogLevel.Trace, new EventId(7, nameof(ReceivedInvocation)), "Received Invocation '{invocationId}': {methodName}({args})."); + LoggerMessage.Define(LogLevel.Trace, new EventId(8, nameof(ReceivedInvocation)), "Received Invocation '{invocationId}': {methodName}({args})."); private static readonly Action _dropCompletionMessage = - LoggerMessage.Define(LogLevel.Warning, new EventId(8, nameof(DropCompletionMessage)), "Dropped unsolicited Completion message for invocation '{invocationId}'."); + LoggerMessage.Define(LogLevel.Warning, new EventId(9, nameof(DropCompletionMessage)), "Dropped unsolicited Completion message for invocation '{invocationId}'."); private static readonly Action _dropStreamMessage = - LoggerMessage.Define(LogLevel.Warning, new EventId(9, nameof(DropStreamMessage)), "Dropped unsolicited StreamItem message for invocation '{invocationId}'."); + LoggerMessage.Define(LogLevel.Warning, new EventId(10, nameof(DropStreamMessage)), "Dropped unsolicited StreamItem message for invocation '{invocationId}'."); private static readonly Action _shutdownConnection = - LoggerMessage.Define(LogLevel.Trace, new EventId(10, nameof(ShutdownConnection)), "Shutting down connection."); + LoggerMessage.Define(LogLevel.Trace, new EventId(11, nameof(ShutdownConnection)), "Shutting down connection."); private static readonly Action _shutdownWithError = - LoggerMessage.Define(LogLevel.Error, new EventId(11, nameof(ShutdownWithError)), "Connection is shutting down due to an error."); + LoggerMessage.Define(LogLevel.Error, new EventId(12, nameof(ShutdownWithError)), "Connection is shutting down due to an error."); private static readonly Action _removeInvocation = - LoggerMessage.Define(LogLevel.Trace, new EventId(12, nameof(RemoveInvocation)), "Removing pending invocation {invocationId}."); + LoggerMessage.Define(LogLevel.Trace, new EventId(13, nameof(RemoveInvocation)), "Removing pending invocation {invocationId}."); private static readonly Action _missingHandler = - LoggerMessage.Define(LogLevel.Warning, new EventId(13, nameof(MissingHandler)), "Failed to find handler for '{target}' method."); + LoggerMessage.Define(LogLevel.Warning, new EventId(14, nameof(MissingHandler)), "Failed to find handler for '{target}' method."); private static readonly Action _receivedStreamItem = - LoggerMessage.Define(LogLevel.Trace, new EventId(14, nameof(ReceivedStreamItem)), "Received StreamItem for Invocation {invocationId}."); + LoggerMessage.Define(LogLevel.Trace, new EventId(15, nameof(ReceivedStreamItem)), "Received StreamItem for Invocation {invocationId}."); private static readonly Action _cancelingStreamItem = - LoggerMessage.Define(LogLevel.Trace, new EventId(15, nameof(CancelingStreamItem)), "Canceling dispatch of StreamItem message for Invocation {invocationId}. The invocation was canceled."); + LoggerMessage.Define(LogLevel.Trace, new EventId(16, nameof(CancelingStreamItem)), "Canceling dispatch of StreamItem message for Invocation {invocationId}. The invocation was canceled."); private static readonly Action _receivedStreamItemAfterClose = - LoggerMessage.Define(LogLevel.Warning, new EventId(16, nameof(ReceivedStreamItemAfterClose)), "Invocation {invocationId} received stream item after channel was closed."); + LoggerMessage.Define(LogLevel.Warning, new EventId(17, nameof(ReceivedStreamItemAfterClose)), "Invocation {invocationId} received stream item after channel was closed."); private static readonly Action _receivedInvocationCompletion = - LoggerMessage.Define(LogLevel.Trace, new EventId(17, nameof(ReceivedInvocationCompletion)), "Received Completion for Invocation {invocationId}."); + LoggerMessage.Define(LogLevel.Trace, new EventId(18, nameof(ReceivedInvocationCompletion)), "Received Completion for Invocation {invocationId}."); private static readonly Action _cancelingInvocationCompletion = - LoggerMessage.Define(LogLevel.Trace, new EventId(18, nameof(CancelingInvocationCompletion)), "Canceling dispatch of Completion message for Invocation {invocationId}. The invocation was canceled."); + LoggerMessage.Define(LogLevel.Trace, new EventId(19, nameof(CancelingInvocationCompletion)), "Canceling dispatch of Completion message for Invocation {invocationId}. The invocation was canceled."); private static readonly Action _cancelingCompletion = - LoggerMessage.Define(LogLevel.Trace, new EventId(19, nameof(CancelingCompletion)), "Canceling dispatch of Completion message for Invocation {invocationId}. The invocation was canceled."); + LoggerMessage.Define(LogLevel.Trace, new EventId(20, nameof(CancelingCompletion)), "Canceling dispatch of Completion message for Invocation {invocationId}. The invocation was canceled."); private static readonly Action _invokeAfterTermination = - LoggerMessage.Define(LogLevel.Error, new EventId(20, nameof(InvokeAfterTermination)), "Invoke for Invocation '{invocationId}' was called after the connection was terminated."); + LoggerMessage.Define(LogLevel.Error, new EventId(21, nameof(InvokeAfterTermination)), "Invoke for Invocation '{invocationId}' was called after the connection was terminated."); private static readonly Action _invocationAlreadyInUse = - LoggerMessage.Define(LogLevel.Critical, new EventId(21, nameof(InvocationAlreadyInUse)), "Invocation ID '{invocationId}' is already in use."); + LoggerMessage.Define(LogLevel.Critical, new EventId(22, nameof(InvocationAlreadyInUse)), "Invocation ID '{invocationId}' is already in use."); private static readonly Action _receivedUnexpectedResponse = - LoggerMessage.Define(LogLevel.Error, new EventId(22, nameof(ReceivedUnexpectedResponse)), "Unsolicited response received for invocation '{invocationId}'."); + LoggerMessage.Define(LogLevel.Error, new EventId(23, nameof(ReceivedUnexpectedResponse)), "Unsolicited response received for invocation '{invocationId}'."); private static readonly Action _hubProtocol = - LoggerMessage.Define(LogLevel.Information, new EventId(23, nameof(HubProtocol)), "Using HubProtocol '{protocol}'."); + LoggerMessage.Define(LogLevel.Information, new EventId(24, nameof(HubProtocol)), "Using HubProtocol '{protocol}'."); private static readonly Action _preparingStreamingInvocation = - LoggerMessage.Define(LogLevel.Trace, new EventId(24, nameof(PreparingStreamingInvocation)), "Preparing streaming invocation '{invocationId}' of '{target}', with return type '{returnType}' and {argumentCount} argument(s)."); + LoggerMessage.Define(LogLevel.Trace, new EventId(25, nameof(PreparingStreamingInvocation)), "Preparing streaming invocation '{invocationId}' of '{target}', with return type '{returnType}' and {argumentCount} argument(s)."); private static readonly Action _resettingKeepAliveTimer = - LoggerMessage.Define(LogLevel.Trace, new EventId(25, nameof(ResettingKeepAliveTimer)), "Resetting keep-alive timer, received a message from the server."); + LoggerMessage.Define(LogLevel.Trace, new EventId(26, nameof(ResettingKeepAliveTimer)), "Resetting keep-alive timer, received a message from the server."); private static readonly Action _errorDuringClosedEvent = - LoggerMessage.Define(LogLevel.Error, new EventId(26, nameof(ErrorDuringClosedEvent)), "An exception was thrown in the handler for the Closed event."); + LoggerMessage.Define(LogLevel.Error, new EventId(27, nameof(ErrorDuringClosedEvent)), "An exception was thrown in the handler for the Closed event."); // Category: Streaming and NonStreaming private static readonly Action _invocationCreated = - LoggerMessage.Define(LogLevel.Trace, new EventId(0, nameof(InvocationCreated)), "Invocation {invocationId} created."); + LoggerMessage.Define(LogLevel.Trace, new EventId(1, nameof(InvocationCreated)), "Invocation {invocationId} created."); private static readonly Action _invocationDisposed = - LoggerMessage.Define(LogLevel.Trace, new EventId(1, nameof(InvocationDisposed)), "Invocation {invocationId} disposed."); + LoggerMessage.Define(LogLevel.Trace, new EventId(2, nameof(InvocationDisposed)), "Invocation {invocationId} disposed."); private static readonly Action _invocationCompleted = - LoggerMessage.Define(LogLevel.Trace, new EventId(2, nameof(InvocationCompleted)), "Invocation {invocationId} marked as completed."); + LoggerMessage.Define(LogLevel.Trace, new EventId(3, nameof(InvocationCompleted)), "Invocation {invocationId} marked as completed."); private static readonly Action _invocationFailed = - LoggerMessage.Define(LogLevel.Trace, new EventId(3, nameof(InvocationFailed)), "Invocation {invocationId} marked as failed."); + LoggerMessage.Define(LogLevel.Trace, new EventId(4, nameof(InvocationFailed)), "Invocation {invocationId} marked as failed."); // Category: Streaming private static readonly Action _errorWritingStreamItem = - LoggerMessage.Define(LogLevel.Error, new EventId(4, nameof(ErrorWritingStreamItem)), "Invocation {invocationId} caused an error trying to write a stream item."); + LoggerMessage.Define(LogLevel.Error, new EventId(5, nameof(ErrorWritingStreamItem)), "Invocation {invocationId} caused an error trying to write a stream item."); private static readonly Action _receivedUnexpectedComplete = - LoggerMessage.Define(LogLevel.Error, new EventId(5, nameof(ReceivedUnexpectedComplete)), "Invocation {invocationId} received a completion result, but was invoked as a streaming invocation."); + LoggerMessage.Define(LogLevel.Error, new EventId(6, nameof(ReceivedUnexpectedComplete)), "Invocation {invocationId} received a completion result, but was invoked as a streaming invocation."); // Category: NonStreaming private static readonly Action _streamItemOnNonStreamInvocation = - LoggerMessage.Define(LogLevel.Error, new EventId(4, nameof(StreamItemOnNonStreamInvocation)), "Invocation {invocationId} received stream item but was invoked as a non-streamed invocation."); + LoggerMessage.Define(LogLevel.Error, new EventId(5, nameof(StreamItemOnNonStreamInvocation)), "Invocation {invocationId} received stream item but was invoked as a non-streamed invocation."); private static readonly Action _errorInvokingClientSideMethod = - LoggerMessage.Define(LogLevel.Error, new EventId(5, nameof(ErrorInvokingClientSideMethod)), "Invoking client side method '{methodName}' failed."); + LoggerMessage.Define(LogLevel.Error, new EventId(6, nameof(ErrorInvokingClientSideMethod)), "Invoking client side method '{methodName}' failed."); public static void PreparingNonBlockingInvocation(this ILogger logger, string invocationId, string target, int count) { diff --git a/src/Microsoft.AspNetCore.SignalR.Core/Internal/SignalRCoreLoggerExtensions.cs b/src/Microsoft.AspNetCore.SignalR.Core/Internal/SignalRCoreLoggerExtensions.cs index 493b1f4bfe..bd73aba55a 100644 --- a/src/Microsoft.AspNetCore.SignalR.Core/Internal/SignalRCoreLoggerExtensions.cs +++ b/src/Microsoft.AspNetCore.SignalR.Core/Internal/SignalRCoreLoggerExtensions.cs @@ -79,10 +79,10 @@ namespace Microsoft.AspNetCore.SignalR.Internal // Category: DefaultHubProtocolResolver private static readonly Action _registeredSignalRProtocol = - LoggerMessage.Define(LogLevel.Debug, new EventId(0, nameof(RegisteredSignalRProtocol)), "Registered SignalR Protocol: {ProtocolName}, implemented by {ImplementationType}."); + LoggerMessage.Define(LogLevel.Debug, new EventId(1, nameof(RegisteredSignalRProtocol)), "Registered SignalR Protocol: {ProtocolName}, implemented by {ImplementationType}."); private static readonly Action _foundImplementationForProtocol = - LoggerMessage.Define(LogLevel.Debug, new EventId(1, nameof(FoundImplementationForProtocol)), "Found protocol implementation for requested protocol: {ProtocolName}."); + LoggerMessage.Define(LogLevel.Debug, new EventId(2, nameof(FoundImplementationForProtocol)), "Found protocol implementation for requested protocol: {ProtocolName}."); public static void UsingHubProtocol(this ILogger logger, string hubProtocol) { diff --git a/src/Microsoft.AspNetCore.SignalR.Redis/Internal/RedisLoggerExtensions.cs b/src/Microsoft.AspNetCore.SignalR.Redis/Internal/RedisLoggerExtensions.cs index 63f04221a8..cb6e089045 100644 --- a/src/Microsoft.AspNetCore.SignalR.Redis/Internal/RedisLoggerExtensions.cs +++ b/src/Microsoft.AspNetCore.SignalR.Redis/Internal/RedisLoggerExtensions.cs @@ -12,37 +12,37 @@ namespace Microsoft.AspNetCore.SignalR.Redis.Internal { // Category: RedisHubLifetimeManager private static readonly Action _connectingToEndpoints = - LoggerMessage.Define(LogLevel.Information, new EventId(0, nameof(ConnectingToEndpoints)), "Connecting to Redis endpoints: {endpoints}."); + LoggerMessage.Define(LogLevel.Information, new EventId(1, nameof(ConnectingToEndpoints)), "Connecting to Redis endpoints: {endpoints}."); private static readonly Action _connected = - LoggerMessage.Define(LogLevel.Information, new EventId(1, nameof(Connected)), "Connected to Redis."); + LoggerMessage.Define(LogLevel.Information, new EventId(2, nameof(Connected)), "Connected to Redis."); private static readonly Action _subscribing = - LoggerMessage.Define(LogLevel.Trace, new EventId(2, nameof(Subscribing)), "Subscribing to channel: {channel}."); + LoggerMessage.Define(LogLevel.Trace, new EventId(3, nameof(Subscribing)), "Subscribing to channel: {channel}."); private static readonly Action _receivedFromChannel = - LoggerMessage.Define(LogLevel.Trace, new EventId(3, nameof(ReceivedFromChannel)), "Received message from Redis channel {channel}."); + LoggerMessage.Define(LogLevel.Trace, new EventId(4, nameof(ReceivedFromChannel)), "Received message from Redis channel {channel}."); private static readonly Action _publishToChannel = - LoggerMessage.Define(LogLevel.Trace, new EventId(4, nameof(PublishToChannel)), "Publishing message to Redis channel {channel}."); + LoggerMessage.Define(LogLevel.Trace, new EventId(5, nameof(PublishToChannel)), "Publishing message to Redis channel {channel}."); private static readonly Action _unsubscribe = - LoggerMessage.Define(LogLevel.Trace, new EventId(5, nameof(Unsubscribe)), "Unsubscribing from channel: {channel}."); + LoggerMessage.Define(LogLevel.Trace, new EventId(6, nameof(Unsubscribe)), "Unsubscribing from channel: {channel}."); private static readonly Action _notConnected = - LoggerMessage.Define(LogLevel.Warning, new EventId(6, nameof(Connected)), "Not connected to Redis."); + LoggerMessage.Define(LogLevel.Warning, new EventId(7, nameof(Connected)), "Not connected to Redis."); private static readonly Action _connectionRestored = - LoggerMessage.Define(LogLevel.Information, new EventId(7, nameof(ConnectionRestored)), "Connection to Redis restored."); + LoggerMessage.Define(LogLevel.Information, new EventId(8, nameof(ConnectionRestored)), "Connection to Redis restored."); private static readonly Action _connectionFailed = - LoggerMessage.Define(LogLevel.Warning, new EventId(8, nameof(ConnectionFailed)), "Connection to Redis failed."); + LoggerMessage.Define(LogLevel.Warning, new EventId(9, nameof(ConnectionFailed)), "Connection to Redis failed."); private static readonly Action _failedWritingMessage = - LoggerMessage.Define(LogLevel.Warning, new EventId(9, nameof(FailedWritingMessage)), "Failed writing message."); + LoggerMessage.Define(LogLevel.Warning, new EventId(10, nameof(FailedWritingMessage)), "Failed writing message."); private static readonly Action _internalMessageFailed = - LoggerMessage.Define(LogLevel.Warning, new EventId(10, nameof(InternalMessageFailed)), "Error processing message for internal server message."); + LoggerMessage.Define(LogLevel.Warning, new EventId(11, nameof(InternalMessageFailed)), "Error processing message for internal server message."); public static void ConnectingToEndpoints(this ILogger logger, EndPointCollection endpoints) { diff --git a/src/Microsoft.AspNetCore.Sockets.Client.Http/Internal/SocketClientLoggerExtensions.cs b/src/Microsoft.AspNetCore.Sockets.Client.Http/Internal/SocketClientLoggerExtensions.cs index 6dc92777ad..81479979f3 100644 --- a/src/Microsoft.AspNetCore.Sockets.Client.Http/Internal/SocketClientLoggerExtensions.cs +++ b/src/Microsoft.AspNetCore.Sockets.Client.Http/Internal/SocketClientLoggerExtensions.cs @@ -11,165 +11,165 @@ namespace Microsoft.AspNetCore.Sockets.Client.Internal { // Category: Shared with LongPollingTransport, WebSocketsTransport and ServerSentEventsTransport private static readonly Action _startTransport = - LoggerMessage.Define(LogLevel.Information, new EventId(0, nameof(StartTransport)), "{time}: Connection Id {connectionId}: Starting transport. Transfer mode: {transferMode}."); + LoggerMessage.Define(LogLevel.Information, new EventId(1, nameof(StartTransport)), "{time}: Connection Id {connectionId}: Starting transport. Transfer mode: {transferMode}."); private static readonly Action _transportStopped = - LoggerMessage.Define(LogLevel.Debug, new EventId(1, nameof(TransportStopped)), "{time}: Connection Id {connectionId}: Transport stopped."); + LoggerMessage.Define(LogLevel.Debug, new EventId(2, nameof(TransportStopped)), "{time}: Connection Id {connectionId}: Transport stopped."); private static readonly Action _startReceive = - LoggerMessage.Define(LogLevel.Debug, new EventId(2, nameof(StartReceive)), "{time}: Connection Id {connectionId}: Starting receive loop."); + LoggerMessage.Define(LogLevel.Debug, new EventId(3, nameof(StartReceive)), "{time}: Connection Id {connectionId}: Starting receive loop."); private static readonly Action _receiveStopped = - LoggerMessage.Define(LogLevel.Debug, new EventId(3, nameof(ReceiveStopped)), "{time}: Connection Id {connectionId}: Receive loop stopped."); + LoggerMessage.Define(LogLevel.Debug, new EventId(4, nameof(ReceiveStopped)), "{time}: Connection Id {connectionId}: Receive loop stopped."); private static readonly Action _receiveCanceled = - LoggerMessage.Define(LogLevel.Debug, new EventId(4, nameof(ReceiveCanceled)), "{time}: Connection Id {connectionId}: Receive loop canceled."); + LoggerMessage.Define(LogLevel.Debug, new EventId(5, nameof(ReceiveCanceled)), "{time}: Connection Id {connectionId}: Receive loop canceled."); private static readonly Action _transportStopping = - LoggerMessage.Define(LogLevel.Information, new EventId(5, nameof(TransportStopping)), "{time}: Connection Id {connectionId}: Transport is stopping."); + LoggerMessage.Define(LogLevel.Information, new EventId(6, nameof(TransportStopping)), "{time}: Connection Id {connectionId}: Transport is stopping."); private static readonly Action _sendStarted = - LoggerMessage.Define(LogLevel.Debug, new EventId(6, nameof(SendStarted)), "{time}: Connection Id {connectionId}: Starting the send loop."); + LoggerMessage.Define(LogLevel.Debug, new EventId(7, nameof(SendStarted)), "{time}: Connection Id {connectionId}: Starting the send loop."); private static readonly Action _sendStopped = - LoggerMessage.Define(LogLevel.Debug, new EventId(7, nameof(SendStopped)), "{time}: Connection Id {connectionId}: Send loop stopped."); + LoggerMessage.Define(LogLevel.Debug, new EventId(8, nameof(SendStopped)), "{time}: Connection Id {connectionId}: Send loop stopped."); private static readonly Action _sendCanceled = - LoggerMessage.Define(LogLevel.Debug, new EventId(8, nameof(SendCanceled)), "{time}: Connection Id {connectionId}: Send loop canceled."); + LoggerMessage.Define(LogLevel.Debug, new EventId(9, nameof(SendCanceled)), "{time}: Connection Id {connectionId}: Send loop canceled."); // Category: WebSocketsTransport private static readonly Action _webSocketClosed = - LoggerMessage.Define(LogLevel.Information, new EventId(9, nameof(WebSocketClosed)), "{time}: Connection Id {connectionId}: Websocket closed by the server. Close status {closeStatus}."); + LoggerMessage.Define(LogLevel.Information, new EventId(10, nameof(WebSocketClosed)), "{time}: Connection Id {connectionId}: Websocket closed by the server. Close status {closeStatus}."); private static readonly Action _messageReceived = - LoggerMessage.Define(LogLevel.Debug, new EventId(10, nameof(MessageReceived)), "{time}: Connection Id {connectionId}: Message received. Type: {messageType}, size: {count}, EndOfMessage: {endOfMessage}."); + LoggerMessage.Define(LogLevel.Debug, new EventId(11, nameof(MessageReceived)), "{time}: Connection Id {connectionId}: Message received. Type: {messageType}, size: {count}, EndOfMessage: {endOfMessage}."); private static readonly Action _messageToApp = - LoggerMessage.Define(LogLevel.Debug, new EventId(11, nameof(MessageToApp)), "{time}: Connection Id {connectionId}: Passing message to application. Payload size: {count}."); + LoggerMessage.Define(LogLevel.Debug, new EventId(12, nameof(MessageToApp)), "{time}: Connection Id {connectionId}: Passing message to application. Payload size: {count}."); private static readonly Action _receivedFromApp = - LoggerMessage.Define(LogLevel.Debug, new EventId(12, nameof(ReceivedFromApp)), "{time}: Connection Id {connectionId}: Received message from application. Payload size: {count}."); + LoggerMessage.Define(LogLevel.Debug, new EventId(13, nameof(ReceivedFromApp)), "{time}: Connection Id {connectionId}: Received message from application. Payload size: {count}."); private static readonly Action _sendMessageCanceled = - LoggerMessage.Define(LogLevel.Information, new EventId(13, nameof(SendMessageCanceled)), "{time}: Connection Id {connectionId}: Sending a message canceled."); + LoggerMessage.Define(LogLevel.Information, new EventId(14, nameof(SendMessageCanceled)), "{time}: Connection Id {connectionId}: Sending a message canceled."); private static readonly Action _errorSendingMessage = - LoggerMessage.Define(LogLevel.Error, new EventId(14, nameof(ErrorSendingMessage)), "{time}: Connection Id {connectionId}: Error while sending a message."); + LoggerMessage.Define(LogLevel.Error, new EventId(15, nameof(ErrorSendingMessage)), "{time}: Connection Id {connectionId}: Error while sending a message."); private static readonly Action _closingWebSocket = - LoggerMessage.Define(LogLevel.Information, new EventId(15, nameof(ClosingWebSocket)), "{time}: Connection Id {connectionId}: Closing WebSocket."); + LoggerMessage.Define(LogLevel.Information, new EventId(16, nameof(ClosingWebSocket)), "{time}: Connection Id {connectionId}: Closing WebSocket."); private static readonly Action _closingWebSocketFailed = - LoggerMessage.Define(LogLevel.Information, new EventId(16, nameof(ClosingWebSocketFailed)), "{time}: Connection Id {connectionId}: Closing webSocket failed."); + LoggerMessage.Define(LogLevel.Information, new EventId(17, nameof(ClosingWebSocketFailed)), "{time}: Connection Id {connectionId}: Closing webSocket failed."); private static readonly Action _cancelMessage = - LoggerMessage.Define(LogLevel.Debug, new EventId(17, nameof(CancelMessage)), "{time}: Connection Id {connectionId}: Canceled passing message to application."); + LoggerMessage.Define(LogLevel.Debug, new EventId(18, nameof(CancelMessage)), "{time}: Connection Id {connectionId}: Canceled passing message to application."); // Category: ServerSentEventsTransport and LongPollingTransport private static readonly Action _sendingMessages = - LoggerMessage.Define(LogLevel.Debug, new EventId(9, nameof(SendingMessages)), "{time}: Connection Id {connectionId}: Sending {count} message(s) to the server using url: {url}."); + LoggerMessage.Define(LogLevel.Debug, new EventId(10, nameof(SendingMessages)), "{time}: Connection Id {connectionId}: Sending {count} message(s) to the server using url: {url}."); private static readonly Action _sentSuccessfully = - LoggerMessage.Define(LogLevel.Debug, new EventId(10, nameof(SentSuccessfully)), "{time}: Connection Id {connectionId}: Message(s) sent successfully."); + LoggerMessage.Define(LogLevel.Debug, new EventId(11, nameof(SentSuccessfully)), "{time}: Connection Id {connectionId}: Message(s) sent successfully."); private static readonly Action _noMessages = - LoggerMessage.Define(LogLevel.Debug, new EventId(11, nameof(NoMessages)), "{time}: Connection Id {connectionId}: No messages in batch to send."); + LoggerMessage.Define(LogLevel.Debug, new EventId(12, nameof(NoMessages)), "{time}: Connection Id {connectionId}: No messages in batch to send."); private static readonly Action _errorSending = - LoggerMessage.Define(LogLevel.Error, new EventId(12, nameof(ErrorSending)), "{time}: Connection Id {connectionId}: Error while sending to '{url}'."); + LoggerMessage.Define(LogLevel.Error, new EventId(13, nameof(ErrorSending)), "{time}: Connection Id {connectionId}: Error while sending to '{url}'."); // Category: ServerSentEventsTransport private static readonly Action _eventStreamEnded = - LoggerMessage.Define(LogLevel.Debug, new EventId(13, nameof(EventStreamEnded)), "{time}: Connection Id {connectionId}: Server-Sent Event Stream ended."); + LoggerMessage.Define(LogLevel.Debug, new EventId(14, nameof(EventStreamEnded)), "{time}: Connection Id {connectionId}: Server-Sent Event Stream ended."); // Category: LongPollingTransport private static readonly Action _closingConnection = - LoggerMessage.Define(LogLevel.Debug, new EventId(13, nameof(ClosingConnection)), "{time}: Connection Id {connectionId}: The server is closing the connection."); + LoggerMessage.Define(LogLevel.Debug, new EventId(14, nameof(ClosingConnection)), "{time}: Connection Id {connectionId}: The server is closing the connection."); private static readonly Action _receivedMessages = - LoggerMessage.Define(LogLevel.Debug, new EventId(14, nameof(ReceivedMessages)), "{time}: Connection Id {connectionId}: Received messages from the server."); + LoggerMessage.Define(LogLevel.Debug, new EventId(15, nameof(ReceivedMessages)), "{time}: Connection Id {connectionId}: Received messages from the server."); private static readonly Action _errorPolling = - LoggerMessage.Define(LogLevel.Error, new EventId(15, nameof(ErrorPolling)), "{time}: Connection Id {connectionId}: Error while polling '{pollUrl}'."); + LoggerMessage.Define(LogLevel.Error, new EventId(16, nameof(ErrorPolling)), "{time}: Connection Id {connectionId}: Error while polling '{pollUrl}'."); // Category: HttpConnection private static readonly Action _httpConnectionStarting = - LoggerMessage.Define(LogLevel.Debug, new EventId(0, nameof(HttpConnectionStarting)), "{time}: Starting connection."); + LoggerMessage.Define(LogLevel.Debug, new EventId(1, nameof(HttpConnectionStarting)), "{time}: Starting connection."); private static readonly Action _httpConnectionClosed = - LoggerMessage.Define(LogLevel.Debug, new EventId(1, nameof(HttpConnectionClosed)), "{time}: Connection Id {connectionId}: Connection was closed from a different thread."); + LoggerMessage.Define(LogLevel.Debug, new EventId(2, nameof(HttpConnectionClosed)), "{time}: Connection Id {connectionId}: Connection was closed from a different thread."); private static readonly Action _startingTransport = - LoggerMessage.Define(LogLevel.Debug, new EventId(2, nameof(StartingTransport)), "{time}: Connection Id {connectionId}: Starting transport '{transport}' with Url: {url}."); + LoggerMessage.Define(LogLevel.Debug, new EventId(3, nameof(StartingTransport)), "{time}: Connection Id {connectionId}: Starting transport '{transport}' with Url: {url}."); private static readonly Action _raiseConnected = - LoggerMessage.Define(LogLevel.Debug, new EventId(3, nameof(RaiseConnected)), "{time}: Connection Id {connectionId}: Raising Connected event."); + LoggerMessage.Define(LogLevel.Debug, new EventId(4, nameof(RaiseConnected)), "{time}: Connection Id {connectionId}: Raising Connected event."); private static readonly Action _processRemainingMessages = - LoggerMessage.Define(LogLevel.Debug, new EventId(4, nameof(ProcessRemainingMessages)), "{time}: Connection Id {connectionId}: Ensuring all outstanding messages are processed."); + LoggerMessage.Define(LogLevel.Debug, new EventId(5, nameof(ProcessRemainingMessages)), "{time}: Connection Id {connectionId}: Ensuring all outstanding messages are processed."); private static readonly Action _drainEvents = - LoggerMessage.Define(LogLevel.Debug, new EventId(5, nameof(DrainEvents)), "{time}: Connection Id {connectionId}: Draining event queue."); + LoggerMessage.Define(LogLevel.Debug, new EventId(6, nameof(DrainEvents)), "{time}: Connection Id {connectionId}: Draining event queue."); private static readonly Action _completeClosed = - LoggerMessage.Define(LogLevel.Debug, new EventId(6, nameof(CompleteClosed)), "{time}: Connection Id {connectionId}: Completing Closed task."); + LoggerMessage.Define(LogLevel.Debug, new EventId(7, nameof(CompleteClosed)), "{time}: Connection Id {connectionId}: Completing Closed task."); private static readonly Action _establishingConnection = - LoggerMessage.Define(LogLevel.Debug, new EventId(7, nameof(EstablishingConnection)), "{time}: Establishing Connection at: {url}."); + LoggerMessage.Define(LogLevel.Debug, new EventId(8, nameof(EstablishingConnection)), "{time}: Establishing Connection at: {url}."); private static readonly Action _errorWithNegotiation = - LoggerMessage.Define(LogLevel.Error, new EventId(8, nameof(ErrorWithNegotiation)), "{time}: Failed to start connection. Error getting negotiation response from '{url}'."); + LoggerMessage.Define(LogLevel.Error, new EventId(9, nameof(ErrorWithNegotiation)), "{time}: Failed to start connection. Error getting negotiation response from '{url}'."); private static readonly Action _errorStartingTransport = - LoggerMessage.Define(LogLevel.Error, new EventId(9, nameof(ErrorStartingTransport)), "{time}: Connection Id {connectionId}: Failed to start connection. Error starting transport '{transport}'."); + LoggerMessage.Define(LogLevel.Error, new EventId(10, nameof(ErrorStartingTransport)), "{time}: Connection Id {connectionId}: Failed to start connection. Error starting transport '{transport}'."); private static readonly Action _httpReceiveStarted = - LoggerMessage.Define(LogLevel.Trace, new EventId(10, nameof(HttpReceiveStarted)), "{time}: Connection Id {connectionId}: Beginning receive loop."); + LoggerMessage.Define(LogLevel.Trace, new EventId(11, nameof(HttpReceiveStarted)), "{time}: Connection Id {connectionId}: Beginning receive loop."); private static readonly Action _skipRaisingReceiveEvent = - LoggerMessage.Define(LogLevel.Debug, new EventId(11, nameof(SkipRaisingReceiveEvent)), "{time}: Connection Id {connectionId}: Message received but connection is not connected. Skipping raising Received event."); + LoggerMessage.Define(LogLevel.Debug, new EventId(12, nameof(SkipRaisingReceiveEvent)), "{time}: Connection Id {connectionId}: Message received but connection is not connected. Skipping raising Received event."); private static readonly Action _scheduleReceiveEvent = - LoggerMessage.Define(LogLevel.Debug, new EventId(12, nameof(ScheduleReceiveEvent)), "{time}: Connection Id {connectionId}: Scheduling raising Received event."); + LoggerMessage.Define(LogLevel.Debug, new EventId(13, nameof(ScheduleReceiveEvent)), "{time}: Connection Id {connectionId}: Scheduling raising Received event."); private static readonly Action _raiseReceiveEvent = - LoggerMessage.Define(LogLevel.Debug, new EventId(13, nameof(RaiseReceiveEvent)), "{time}: Connection Id {connectionId}: Raising Received event."); + LoggerMessage.Define(LogLevel.Debug, new EventId(14, nameof(RaiseReceiveEvent)), "{time}: Connection Id {connectionId}: Raising Received event."); private static readonly Action _failedReadingMessage = - LoggerMessage.Define(LogLevel.Debug, new EventId(14, nameof(FailedReadingMessage)), "{time}: Connection Id {connectionId}: Could not read message."); + LoggerMessage.Define(LogLevel.Debug, new EventId(15, nameof(FailedReadingMessage)), "{time}: Connection Id {connectionId}: Could not read message."); private static readonly Action _errorReceiving = - LoggerMessage.Define(LogLevel.Error, new EventId(15, nameof(ErrorReceiving)), "{time}: Connection Id {connectionId}: Error receiving message."); + LoggerMessage.Define(LogLevel.Error, new EventId(16, nameof(ErrorReceiving)), "{time}: Connection Id {connectionId}: Error receiving message."); private static readonly Action _endReceive = - LoggerMessage.Define(LogLevel.Trace, new EventId(16, nameof(EndReceive)), "{time}: Connection Id {connectionId}: Ending receive loop."); + LoggerMessage.Define(LogLevel.Trace, new EventId(17, nameof(EndReceive)), "{time}: Connection Id {connectionId}: Ending receive loop."); private static readonly Action _sendingMessage = - LoggerMessage.Define(LogLevel.Debug, new EventId(17, nameof(SendingMessage)), "{time}: Connection Id {connectionId}: Sending message."); + LoggerMessage.Define(LogLevel.Debug, new EventId(18, nameof(SendingMessage)), "{time}: Connection Id {connectionId}: Sending message."); private static readonly Action _stoppingClient = - LoggerMessage.Define(LogLevel.Information, new EventId(18, nameof(StoppingClient)), "{time}: Connection Id {connectionId}: Stopping client."); + LoggerMessage.Define(LogLevel.Information, new EventId(19, nameof(StoppingClient)), "{time}: Connection Id {connectionId}: Stopping client."); private static readonly Action _exceptionThrownFromCallback = - LoggerMessage.Define(LogLevel.Error, new EventId(19, nameof(ExceptionThrownFromCallback)), "{time}: Connection Id {connectionId}: An exception was thrown from the '{callback}' callback."); + LoggerMessage.Define(LogLevel.Error, new EventId(20, nameof(ExceptionThrownFromCallback)), "{time}: Connection Id {connectionId}: An exception was thrown from the '{callback}' callback."); private static readonly Action _disposingClient = - LoggerMessage.Define(LogLevel.Information, new EventId(20, nameof(DisposingClient)), "{time}: Connection Id {connectionId}: Disposing client."); + LoggerMessage.Define(LogLevel.Information, new EventId(21, nameof(DisposingClient)), "{time}: Connection Id {connectionId}: Disposing client."); private static readonly Action _abortingClient = - LoggerMessage.Define(LogLevel.Error, new EventId(21, nameof(AbortingClient)), "{time}: Connection Id {connectionId}: Aborting client."); + LoggerMessage.Define(LogLevel.Error, new EventId(22, nameof(AbortingClient)), "{time}: Connection Id {connectionId}: Aborting client."); private static readonly Action _errorDuringClosedEvent = - LoggerMessage.Define(LogLevel.Error, new EventId(22, nameof(ErrorDuringClosedEvent)), "An exception was thrown in the handler for the Closed event."); + LoggerMessage.Define(LogLevel.Error, new EventId(23, nameof(ErrorDuringClosedEvent)), "An exception was thrown in the handler for the Closed event."); private static readonly Action _skippingStop = - LoggerMessage.Define(LogLevel.Debug, new EventId(23, nameof(SkippingStop)), "{time}: Connection Id {connectionId}: Skipping stop, connection is already stopped."); + LoggerMessage.Define(LogLevel.Debug, new EventId(24, nameof(SkippingStop)), "{time}: Connection Id {connectionId}: Skipping stop, connection is already stopped."); private static readonly Action _skippingDispose = - LoggerMessage.Define(LogLevel.Debug, new EventId(24, nameof(SkippingDispose)), "{time}: Connection Id {connectionId}: Skipping dispose, connection is already disposed."); + LoggerMessage.Define(LogLevel.Debug, new EventId(25, nameof(SkippingDispose)), "{time}: Connection Id {connectionId}: Skipping dispose, connection is already disposed."); private static readonly Action _connectionStateChanged = - LoggerMessage.Define(LogLevel.Debug, new EventId(25, nameof(ConnectionStateChanged)), "{time}: Connection Id {connectionId}: Connection state changed from {previousState} to {newState}."); + LoggerMessage.Define(LogLevel.Debug, new EventId(26, nameof(ConnectionStateChanged)), "{time}: Connection Id {connectionId}: Connection state changed from {previousState} to {newState}."); public static void StartTransport(this ILogger logger, string connectionId, TransferMode transferMode) { diff --git a/src/Microsoft.AspNetCore.Sockets.Http/Internal/SocketHttpLoggerExtensions.cs b/src/Microsoft.AspNetCore.Sockets.Http/Internal/SocketHttpLoggerExtensions.cs index ab7154de66..8d10035d20 100644 --- a/src/Microsoft.AspNetCore.Sockets.Http/Internal/SocketHttpLoggerExtensions.cs +++ b/src/Microsoft.AspNetCore.Sockets.Http/Internal/SocketHttpLoggerExtensions.cs @@ -11,94 +11,94 @@ namespace Microsoft.AspNetCore.Sockets.Internal { // Category: LongPollingTransport private static readonly Action _longPolling204 = - LoggerMessage.Define(LogLevel.Information, new EventId(0, nameof(LongPolling204)), "{time}: Connection Id {connectionId}, Request Id {requestId}: Terminating Long Polling connection by sending 204 response."); + LoggerMessage.Define(LogLevel.Information, new EventId(1, nameof(LongPolling204)), "{time}: Connection Id {connectionId}, Request Id {requestId}: Terminating Long Polling connection by sending 204 response."); private static readonly Action _pollTimedOut = - LoggerMessage.Define(LogLevel.Information, new EventId(1, nameof(PollTimedOut)), "{time}: Connection Id {connectionId}, Request Id {requestId}: Poll request timed out. Sending 200 response to connection."); + LoggerMessage.Define(LogLevel.Information, new EventId(2, nameof(PollTimedOut)), "{time}: Connection Id {connectionId}, Request Id {requestId}: Poll request timed out. Sending 200 response to connection."); private static readonly Action _longPollingWritingMessage = - LoggerMessage.Define(LogLevel.Debug, new EventId(2, nameof(LongPollingWritingMessage)), "{time}: Connection Id {connectionId}, Request Id {requestId}: Writing a {count} byte message to connection."); + LoggerMessage.Define(LogLevel.Debug, new EventId(3, nameof(LongPollingWritingMessage)), "{time}: Connection Id {connectionId}, Request Id {requestId}: Writing a {count} byte message to connection."); private static readonly Action _longPollingDisconnected = - LoggerMessage.Define(LogLevel.Debug, new EventId(3, nameof(LongPollingDisconnected)), "{time}: Connection Id {connectionId}, Request Id {requestId}: Client disconnected from Long Polling endpoint for connection."); + LoggerMessage.Define(LogLevel.Debug, new EventId(4, nameof(LongPollingDisconnected)), "{time}: Connection Id {connectionId}, Request Id {requestId}: Client disconnected from Long Polling endpoint for connection."); private static readonly Action _longPollingTerminated = - LoggerMessage.Define(LogLevel.Error, new EventId(4, nameof(LongPollingTerminated)), "{time}: Connection Id {connectionId}, Request Id {requestId}: Long Polling transport was terminated due to an error on connection."); + LoggerMessage.Define(LogLevel.Error, new EventId(5, nameof(LongPollingTerminated)), "{time}: Connection Id {connectionId}, Request Id {requestId}: Long Polling transport was terminated due to an error on connection."); // Category: HttpConnectionDispatcher private static readonly Action _connectionDisposed = - LoggerMessage.Define(LogLevel.Debug, new EventId(0, nameof(ConnectionDisposed)), "{time}: Connection Id {connectionId} was disposed."); + LoggerMessage.Define(LogLevel.Debug, new EventId(1, nameof(ConnectionDisposed)), "{time}: Connection Id {connectionId} was disposed."); private static readonly Action _connectionAlreadyActive = - LoggerMessage.Define(LogLevel.Debug, new EventId(1, nameof(ConnectionAlreadyActive)), "{time}: Connection Id {connectionId} is already active via {requestId}."); + LoggerMessage.Define(LogLevel.Debug, new EventId(2, nameof(ConnectionAlreadyActive)), "{time}: Connection Id {connectionId} is already active via {requestId}."); private static readonly Action _pollCanceled = - LoggerMessage.Define(LogLevel.Debug, new EventId(2, nameof(PollCanceled)), "{time}: Previous poll canceled for {connectionId} on {requestId}."); + LoggerMessage.Define(LogLevel.Debug, new EventId(3, nameof(PollCanceled)), "{time}: Previous poll canceled for {connectionId} on {requestId}."); private static readonly Action _establishedConnection = - LoggerMessage.Define(LogLevel.Debug, new EventId(3, nameof(EstablishedConnection)), "{time}: Connection Id {connectionId}, Request Id {requestId}: Establishing new connection."); + LoggerMessage.Define(LogLevel.Debug, new EventId(4, nameof(EstablishedConnection)), "{time}: Connection Id {connectionId}, Request Id {requestId}: Establishing new connection."); private static readonly Action _resumingConnection = - LoggerMessage.Define(LogLevel.Debug, new EventId(4, nameof(ResumingConnection)), "{time}: Connection Id {connectionId}, Request Id {requestId}: Resuming existing connection."); + LoggerMessage.Define(LogLevel.Debug, new EventId(5, nameof(ResumingConnection)), "{time}: Connection Id {connectionId}, Request Id {requestId}: Resuming existing connection."); private static readonly Action _receivedBytes = - LoggerMessage.Define(LogLevel.Debug, new EventId(5, nameof(ReceivedBytes)), "{time}: Connection Id {connectionId}: Received {count} bytes."); + LoggerMessage.Define(LogLevel.Debug, new EventId(6, nameof(ReceivedBytes)), "{time}: Connection Id {connectionId}: Received {count} bytes."); private static readonly Action _transportNotSupported = - LoggerMessage.Define(LogLevel.Debug, new EventId(6, nameof(TransportNotSupported)), "{time}: Connection Id {connectionId}: {transportType} transport not supported by this endpoint type."); + LoggerMessage.Define(LogLevel.Debug, new EventId(7, nameof(TransportNotSupported)), "{time}: Connection Id {connectionId}: {transportType} transport not supported by this endpoint type."); private static readonly Action _cannotChangeTransport = - LoggerMessage.Define(LogLevel.Debug, new EventId(7, nameof(CannotChangeTransport)), "{time}: Connection Id {connectionId}: Cannot change transports mid-connection; currently using {transportType}, requesting {requestedTransport}."); + LoggerMessage.Define(LogLevel.Debug, new EventId(8, nameof(CannotChangeTransport)), "{time}: Connection Id {connectionId}: Cannot change transports mid-connection; currently using {transportType}, requesting {requestedTransport}."); private static readonly Action _postNotallowedForWebsockets = - LoggerMessage.Define(LogLevel.Debug, new EventId(8, nameof(PostNotAllowedForWebSockets)), "{time}: Connection Id {connectionId}: POST requests are not allowed for websocket connections."); + LoggerMessage.Define(LogLevel.Debug, new EventId(9, nameof(PostNotAllowedForWebSockets)), "{time}: Connection Id {connectionId}: POST requests are not allowed for websocket connections."); private static readonly Action _negotiationRequest = - LoggerMessage.Define(LogLevel.Debug, new EventId(8, nameof(NegotiationRequest)), "{time}: Connection Id {connectionId}: Sending negotiation response."); + LoggerMessage.Define(LogLevel.Debug, new EventId(10, nameof(NegotiationRequest)), "{time}: Connection Id {connectionId}: Sending negotiation response."); // Category: WebSocketsTransport private static readonly Action _socketOpened = - LoggerMessage.Define(LogLevel.Information, new EventId(0, nameof(SocketOpened)), "{time}: Connection Id {connectionId}: Socket opened."); + LoggerMessage.Define(LogLevel.Information, new EventId(1, nameof(SocketOpened)), "{time}: Connection Id {connectionId}: Socket opened."); private static readonly Action _socketClosed = - LoggerMessage.Define(LogLevel.Information, new EventId(1, nameof(SocketClosed)), "{time}: Connection Id {connectionId}: Socket closed."); + LoggerMessage.Define(LogLevel.Information, new EventId(2, nameof(SocketClosed)), "{time}: Connection Id {connectionId}: Socket closed."); private static readonly Action _clientClosed = - LoggerMessage.Define(LogLevel.Debug, new EventId(2, nameof(ClientClosed)), "{time}: Connection Id {connectionId}: Client closed connection with status code '{status}' ({description}). Signaling end-of-input to application.."); + LoggerMessage.Define(LogLevel.Debug, new EventId(3, nameof(ClientClosed)), "{time}: Connection Id {connectionId}: Client closed connection with status code '{status}' ({description}). Signaling end-of-input to application."); private static readonly Action _waitingForSend = - LoggerMessage.Define(LogLevel.Debug, new EventId(3, nameof(WaitingForSend)), "{time}: Connection Id {connectionId}: Waiting for the application to finish sending data."); + LoggerMessage.Define(LogLevel.Debug, new EventId(4, nameof(WaitingForSend)), "{time}: Connection Id {connectionId}: Waiting for the application to finish sending data."); private static readonly Action _failedSending = - LoggerMessage.Define(LogLevel.Debug, new EventId(4, nameof(FailedSending)), "{time}: Connection Id {connectionId}: Application failed during sending. Sending InternalServerError close frame."); + LoggerMessage.Define(LogLevel.Debug, new EventId(5, nameof(FailedSending)), "{time}: Connection Id {connectionId}: Application failed during sending. Sending InternalServerError close frame."); private static readonly Action _finishedSending = - LoggerMessage.Define(LogLevel.Debug, new EventId(5, nameof(FinishedSending)), "{time}: Connection Id {connectionId}: Application finished sending. Sending close frame."); + LoggerMessage.Define(LogLevel.Debug, new EventId(6, nameof(FinishedSending)), "{time}: Connection Id {connectionId}: Application finished sending. Sending close frame."); private static readonly Action _waitingForClose = - LoggerMessage.Define(LogLevel.Debug, new EventId(6, nameof(WaitingForClose)), "{time}: Connection Id {connectionId}: Waiting for the client to close the socket."); + LoggerMessage.Define(LogLevel.Debug, new EventId(7, nameof(WaitingForClose)), "{time}: Connection Id {connectionId}: Waiting for the client to close the socket."); private static readonly Action _closeTimedOut = - LoggerMessage.Define(LogLevel.Debug, new EventId(7, nameof(CloseTimedOut)), "{time}: Connection Id {connectionId}: Timed out waiting for client to send the close frame, aborting the connection."); + LoggerMessage.Define(LogLevel.Debug, new EventId(8, nameof(CloseTimedOut)), "{time}: Connection Id {connectionId}: Timed out waiting for client to send the close frame, aborting the connection."); private static readonly Action _messageReceived = - LoggerMessage.Define(LogLevel.Debug, new EventId(8, nameof(MessageReceived)), "{time}: Connection Id {connectionId}: Message received. Type: {messageType}, size: {size}, EndOfMessage: {endOfMessage}."); + LoggerMessage.Define(LogLevel.Debug, new EventId(9, nameof(MessageReceived)), "{time}: Connection Id {connectionId}: Message received. Type: {messageType}, size: {size}, EndOfMessage: {endOfMessage}."); private static readonly Action _messageToApplication = - LoggerMessage.Define(LogLevel.Debug, new EventId(9, nameof(MessageToApplication)), "{time}: Connection Id {connectionId}: Passing message to application. Payload size: {size}."); + LoggerMessage.Define(LogLevel.Debug, new EventId(10, nameof(MessageToApplication)), "{time}: Connection Id {connectionId}: Passing message to application. Payload size: {size}."); private static readonly Action _sendPayload = - LoggerMessage.Define(LogLevel.Debug, new EventId(10, nameof(SendPayload)), "{time}: Connection Id {connectionId}: Sending payload: {size} bytes."); + LoggerMessage.Define(LogLevel.Debug, new EventId(11, nameof(SendPayload)), "{time}: Connection Id {connectionId}: Sending payload: {size} bytes."); private static readonly Action _errorWritingFrame = - LoggerMessage.Define(LogLevel.Error, new EventId(11, nameof(ErrorWritingFrame)), "{time}: Connection Id {connectionId}: Error writing frame."); + LoggerMessage.Define(LogLevel.Error, new EventId(12, nameof(ErrorWritingFrame)), "{time}: Connection Id {connectionId}: Error writing frame."); private static readonly Action _sendFailed = - LoggerMessage.Define(LogLevel.Trace, new EventId(12, nameof(SendFailed)), "{time}: Connection Id {connectionId}: Socket failed to send."); + LoggerMessage.Define(LogLevel.Trace, new EventId(13, nameof(SendFailed)), "{time}: Connection Id {connectionId}: Socket failed to send."); // Category: ServerSentEventsTransport private static readonly Action _sseWritingMessage = - LoggerMessage.Define(LogLevel.Debug, new EventId(0, nameof(SSEWritingMessage)), "{time}: Connection Id {connectionId}: Writing a {count} byte message."); + LoggerMessage.Define(LogLevel.Debug, new EventId(1, nameof(SSEWritingMessage)), "{time}: Connection Id {connectionId}: Writing a {count} byte message."); public static void LongPolling204(this ILogger logger, string connectionId, string requestId) { diff --git a/src/Microsoft.AspNetCore.Sockets/Internal/SocketLoggerExtensions.cs b/src/Microsoft.AspNetCore.Sockets/Internal/SocketLoggerExtensions.cs index f85281c86c..afbabccdaa 100644 --- a/src/Microsoft.AspNetCore.Sockets/Internal/SocketLoggerExtensions.cs +++ b/src/Microsoft.AspNetCore.Sockets/Internal/SocketLoggerExtensions.cs @@ -10,25 +10,25 @@ namespace Microsoft.AspNetCore.Sockets.Internal { // Category: ConnectionManager private static readonly Action _createdNewConnection = - LoggerMessage.Define(LogLevel.Debug, new EventId(0, nameof(CreatedNewConnection)), "{time}: ConnectionId {connectionId}: New connection created."); + LoggerMessage.Define(LogLevel.Debug, new EventId(1, nameof(CreatedNewConnection)), "{time}: ConnectionId {connectionId}: New connection created."); private static readonly Action _removedConnection = - LoggerMessage.Define(LogLevel.Debug, new EventId(1, nameof(RemovedConnection)), "{time}: ConnectionId {connectionId}: Removing connection from the list of connections."); + LoggerMessage.Define(LogLevel.Debug, new EventId(2, nameof(RemovedConnection)), "{time}: ConnectionId {connectionId}: Removing connection from the list of connections."); private static readonly Action _failedDispose = - LoggerMessage.Define(LogLevel.Error, new EventId(2, nameof(FailedDispose)), "{time}: ConnectionId {connectionId}: Failed disposing connection."); + LoggerMessage.Define(LogLevel.Error, new EventId(3, nameof(FailedDispose)), "{time}: ConnectionId {connectionId}: Failed disposing connection."); private static readonly Action _connectionReset = - LoggerMessage.Define(LogLevel.Trace, new EventId(3, nameof(ConnectionReset)), "{time}: ConnectionId {connectionId}: Connection was reset."); + LoggerMessage.Define(LogLevel.Trace, new EventId(4, nameof(ConnectionReset)), "{time}: ConnectionId {connectionId}: Connection was reset."); private static readonly Action _connectionTimedOut = - LoggerMessage.Define(LogLevel.Trace, new EventId(4, nameof(ConnectionTimedOut)), "{time}: ConnectionId {connectionId}: Connection timed out."); + LoggerMessage.Define(LogLevel.Trace, new EventId(5, nameof(ConnectionTimedOut)), "{time}: ConnectionId {connectionId}: Connection timed out."); private static readonly Action _scanningConnections = - LoggerMessage.Define(LogLevel.Trace, new EventId(5, nameof(ScanningConnections)), "{time}: Scanning connections."); + LoggerMessage.Define(LogLevel.Trace, new EventId(6, nameof(ScanningConnections)), "{time}: Scanning connections."); private static readonly Action _scannedConnections = - LoggerMessage.Define(LogLevel.Trace, new EventId(6, nameof(ScannedConnections)), "{time}: Scanned connections in {duration}."); + LoggerMessage.Define(LogLevel.Trace, new EventId(7, nameof(ScannedConnections)), "{time}: Scanned connections in {duration}."); public static void CreatedNewConnection(this ILogger logger, string connectionId) {