Skip to content

Commit

Permalink
Merge pull request #383 from wazuh/feature/368-request-trace-logs
Browse files Browse the repository at this point in the history
Print request content as trace logs
  • Loading branch information
vikman90 authored Dec 3, 2024
2 parents 64afb13 + ca12132 commit 554b973
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/agent/communicator/src/http_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ namespace http_client
timerSleep = connectionRetry;
}

LogDebug("{}", ResponseToString(reqParams.Endpoint, res));
LogDebug("Request {}: Status {}", reqParams.Endpoint, res.result_int());
LogTrace("{}", ResponseToString(reqParams.Endpoint, res));

co_await WaitForTimer(timer, timerSleep);
} while (loopRequestCondition != nullptr && loopRequestCondition());
Expand Down Expand Up @@ -393,7 +394,8 @@ namespace http_client
throw std::runtime_error("Error handling response: " + ec.message());
}

LogDebug("{}", ResponseToString(params.Endpoint, res));
LogDebug("Request {}: Status {}", params.Endpoint, res.result_int());
LogTrace("{}", ResponseToString(params.Endpoint, res));
}
catch (std::exception const& e)
{
Expand Down

0 comments on commit 554b973

Please sign in to comment.