Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print request content as trace logs #383

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading