mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2025-11-02 11:27:38 +00:00
Removed some unhelpful verbose logs
This commit is contained in:
parent
995cd3d84c
commit
9d3295acc7
@ -102,7 +102,6 @@ namespace CryptoExchange.Net.Clients
|
|||||||
if (ClientOptions == null)
|
if (ClientOptions == null)
|
||||||
throw new InvalidOperationException("Client should have called Initialize before adding API clients");
|
throw new InvalidOperationException("Client should have called Initialize before adding API clients");
|
||||||
|
|
||||||
_logger.Log(LogLevel.Trace, $" {apiClient.GetType().Name}, base address: {apiClient.BaseAddress}");
|
|
||||||
ApiClients.Add(apiClient);
|
ApiClients.Add(apiClient);
|
||||||
return apiClient;
|
return apiClient;
|
||||||
}
|
}
|
||||||
@ -122,7 +121,6 @@ namespace CryptoExchange.Net.Clients
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual void Dispose()
|
public virtual void Dispose()
|
||||||
{
|
{
|
||||||
_logger.Log(LogLevel.Debug, "Disposing client");
|
|
||||||
foreach (var client in ApiClients)
|
foreach (var client in ApiClients)
|
||||||
client.Dispose();
|
client.Dispose();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,7 +13,6 @@ namespace CryptoExchange.Net.Logging.Extensions
|
|||||||
private static readonly Action<ILogger, int, Exception?> _unknownExceptionWhileProcessingReconnection;
|
private static readonly Action<ILogger, int, Exception?> _unknownExceptionWhileProcessingReconnection;
|
||||||
private static readonly Action<ILogger, int, WebSocketError, string?, Exception?> _webSocketErrorCodeAndDetails;
|
private static readonly Action<ILogger, int, WebSocketError, string?, Exception?> _webSocketErrorCodeAndDetails;
|
||||||
private static readonly Action<ILogger, int, string?, Exception?> _webSocketError;
|
private static readonly Action<ILogger, int, string?, Exception?> _webSocketError;
|
||||||
private static readonly Action<ILogger, int, int, Exception?> _messageSentNotPending;
|
|
||||||
private static readonly Action<ILogger, int, string, Exception?> _receivedData;
|
private static readonly Action<ILogger, int, string, Exception?> _receivedData;
|
||||||
private static readonly Action<ILogger, int, string, Exception?> _failedToParse;
|
private static readonly Action<ILogger, int, string, Exception?> _failedToParse;
|
||||||
private static readonly Action<ILogger, int, string, Exception?> _failedToEvaluateMessage;
|
private static readonly Action<ILogger, int, string, Exception?> _failedToEvaluateMessage;
|
||||||
@ -72,11 +71,6 @@ namespace CryptoExchange.Net.Logging.Extensions
|
|||||||
new EventId(2005, "WebSocketError"),
|
new EventId(2005, "WebSocketError"),
|
||||||
"[Sckt {SocketId}] error: {ErrorMessage}");
|
"[Sckt {SocketId}] error: {ErrorMessage}");
|
||||||
|
|
||||||
_messageSentNotPending = LoggerMessage.Define<int, int>(
|
|
||||||
LogLevel.Debug,
|
|
||||||
new EventId(2006, "MessageSentNotPending"),
|
|
||||||
"[Sckt {SocketId}] [Req {RequestId}] message sent, but not pending");
|
|
||||||
|
|
||||||
_receivedData = LoggerMessage.Define<int, string>(
|
_receivedData = LoggerMessage.Define<int, string>(
|
||||||
LogLevel.Trace,
|
LogLevel.Trace,
|
||||||
new EventId(2007, "ReceivedData"),
|
new EventId(2007, "ReceivedData"),
|
||||||
@ -234,11 +228,6 @@ namespace CryptoExchange.Net.Logging.Extensions
|
|||||||
_webSocketError(logger, socketId, errorMessage, e);
|
_webSocketError(logger, socketId, errorMessage, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void MessageSentNotPending(this ILogger logger, int socketId, int requestId)
|
|
||||||
{
|
|
||||||
_messageSentNotPending(logger, socketId, requestId, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void ReceivedData(this ILogger logger, int socketId, string originalData)
|
public static void ReceivedData(this ILogger logger, int socketId, string originalData)
|
||||||
{
|
{
|
||||||
_receivedData(logger, socketId, originalData, null);
|
_receivedData(logger, socketId, originalData, null);
|
||||||
|
|||||||
@ -449,10 +449,7 @@ namespace CryptoExchange.Net.Sockets
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (query == null)
|
if (query == null)
|
||||||
{
|
return Task.CompletedTask;
|
||||||
_logger.MessageSentNotPending(SocketId, requestId);
|
|
||||||
return Task.CompletedTask;
|
|
||||||
}
|
|
||||||
|
|
||||||
query.IsSend(query.RequestTimeout ?? ApiClient.ClientOptions.RequestTimeout);
|
query.IsSend(query.RequestTimeout ?? ApiClient.ClientOptions.RequestTimeout);
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user