mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2026-02-16 14:13:46 +00:00
Removed duplicate logging for rest responses in Trace verbosity
This commit is contained in:
parent
fc2d3fc2d2
commit
fa9300ce97
@ -454,9 +454,6 @@ namespace CryptoExchange.Net.Clients
|
||||
{
|
||||
memoryStream.Position = 0;
|
||||
originalData = await reader.ReadToEndAsync().ConfigureAwait(false);
|
||||
|
||||
if (_logger.IsEnabled(LogLevel.Trace))
|
||||
_logger.RestApiReceivedResponse(request.RequestId, originalData);
|
||||
}
|
||||
|
||||
// Continue processing from the memory stream since the response stream is already read and we can't seek it
|
||||
|
||||
@ -22,7 +22,6 @@ namespace CryptoExchange.Net.Logging.Extensions
|
||||
private static readonly Action<ILogger, string, Exception?> _restApiCacheHit;
|
||||
private static readonly Action<ILogger, string, Exception?> _restApiCacheNotHit;
|
||||
private static readonly Action<ILogger, int?, Exception?> _restApiCancellationRequested;
|
||||
private static readonly Action<ILogger, int?, string?, Exception?> _restApiReceivedResponse;
|
||||
|
||||
static RestApiClientLoggingExtensions()
|
||||
{
|
||||
@ -91,11 +90,6 @@ namespace CryptoExchange.Net.Logging.Extensions
|
||||
new EventId(4012, "RestApiCancellationRequested"),
|
||||
"[Req {RequestId}] Request cancelled by user");
|
||||
|
||||
_restApiReceivedResponse = LoggerMessage.Define<int?, string?>(
|
||||
LogLevel.Trace,
|
||||
new EventId(4013, "RestApiReceivedResponse"),
|
||||
"[Req {RequestId}] Received response: {Data}");
|
||||
|
||||
}
|
||||
|
||||
public static void RestApiErrorReceived(this ILogger logger, int? requestId, HttpStatusCode? responseStatusCode, long responseTime, string? error, string? originalData, Exception? exception)
|
||||
@ -161,10 +155,5 @@ namespace CryptoExchange.Net.Logging.Extensions
|
||||
{
|
||||
_restApiCancellationRequested(logger, requestId, null);
|
||||
}
|
||||
|
||||
public static void RestApiReceivedResponse(this ILogger logger, int requestId, string? originalData)
|
||||
{
|
||||
_restApiReceivedResponse(logger, requestId, originalData, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user