From 4fd7e44015989e74b660d9691ff37e33c6b3d626 Mon Sep 17 00:00:00 2001 From: JKorf Date: Sat, 16 Sep 2023 18:26:10 +0200 Subject: [PATCH] Logging --- CryptoExchange.Net/Sockets/CryptoExchangeWebSocketClient.cs | 2 +- CryptoExchange.Net/Sockets/SocketConnection.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CryptoExchange.Net/Sockets/CryptoExchangeWebSocketClient.cs b/CryptoExchange.Net/Sockets/CryptoExchangeWebSocketClient.cs index cc493be..3c9ab9b 100644 --- a/CryptoExchange.Net/Sockets/CryptoExchangeWebSocketClient.cs +++ b/CryptoExchange.Net/Sockets/CryptoExchangeWebSocketClient.cs @@ -278,7 +278,7 @@ namespace CryptoExchange.Net.Sockets return; var bytes = Parameters.Encoding.GetBytes(data); - _logger.Log(LogLevel.Trace, $"Socket {Id} - msg {id} - Adding {bytes.Length} to send buffer"); + _logger.Log(LogLevel.Trace, $"Socket {Id} - msg {id} - Adding {bytes.Length} bytes to send buffer"); _sendBuffer.Enqueue(new SendItem { Id = id, Weight = weight, Bytes = bytes }); _sendEvent.Set(); } diff --git a/CryptoExchange.Net/Sockets/SocketConnection.cs b/CryptoExchange.Net/Sockets/SocketConnection.cs index dc71700..efb41cf 100644 --- a/CryptoExchange.Net/Sockets/SocketConnection.cs +++ b/CryptoExchange.Net/Sockets/SocketConnection.cs @@ -294,7 +294,7 @@ namespace CryptoExchange.Net.Sockets var pendingRequest = _pendingRequests.SingleOrDefault(p => p.Id == requestId); if (pendingRequest == null) { - _logger.Log(LogLevel.Debug, $"Socket {SocketId} - msg {requestId} - message sent, but not pending"); + _logger.Log(LogLevel.Debug, $"Socket {SocketId} - msg {requestId} - message sent, but not pending"); return; } @@ -380,7 +380,7 @@ namespace CryptoExchange.Net.Sockets "Data from this socket may arrive late or not at all if message processing is continuously slow."); } - _logger.Log(LogLevel.Trace, $"Socket {SocketId}{(subscription == null ? "" : " subscription " + subscription!.Id)} message processed in {(int)total.TotalMilliseconds}ms, ({(int)userProcessTime.TotalMilliseconds}ms user code)"); + _logger.Log(LogLevel.Trace, $"Socket {SocketId}{(subscription == null ? "" : " subscription " + subscription!.Id)} message processed in {(int)total.TotalMilliseconds}ms ({(int)userProcessTime.TotalMilliseconds}ms user code)"); } ///