Skip to content

Commit

Permalink
chore: added debug log for successful requests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpop-zengenti committed Oct 4, 2024
1 parent d140335 commit f9b540e
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,17 @@ public async Task<EndpointResponse> Invoke(

if (!endpointResponse.IsErrorStatusCode())
{
if (_logger.IsEnabled(LogLevel.Debug))
{
var curlString = ErrorResources.CreateCurlCallString(routeInfo);

_logger.LogDebug(
"Invoking endpoint {Uri} was successful with status code {StatusCode}. The equivalent curl command is: {CurlString}",
routeInfo.Uri,
endpointResponse.StatusCode,
curlString);
}

return endpointResponse;
}

Expand Down

0 comments on commit f9b540e

Please sign in to comment.