Add extra debug logging.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
739f5d4b3b
commit
c04ad4b4ab
|
@ -54,6 +54,7 @@ Document::Document(Config &cfg)
|
||||||
, _profiledata{_cfg.profiledata}
|
, _profiledata{_cfg.profiledata}
|
||||||
{
|
{
|
||||||
RestClient::init();
|
RestClient::init();
|
||||||
|
BOOST_LOG_TRIVIAL(debug) << "Initialized RestClient.";
|
||||||
|
|
||||||
download();
|
download();
|
||||||
}
|
}
|
||||||
|
@ -65,12 +66,20 @@ Document::~Document()
|
||||||
|
|
||||||
void Document::download(const string &uri, const bool temp_redirect)
|
void Document::download(const string &uri, const bool temp_redirect)
|
||||||
{
|
{
|
||||||
|
BOOST_LOG_TRIVIAL(debug) << "Downloading <" << uri << "> …";
|
||||||
RestClient::Connection connection{uri};
|
RestClient::Connection connection{uri};
|
||||||
connection.SetUserAgent(string("mastorss/").append(version));
|
connection.SetUserAgent(string("mastorss/").append(version));
|
||||||
connection.FollowRedirects(false);
|
connection.FollowRedirects(false);
|
||||||
|
|
||||||
RestClient::Response response{connection.get("")};
|
RestClient::Response response{connection.get("")};
|
||||||
|
|
||||||
|
BOOST_LOG_TRIVIAL(debug) << "Got response: " << response.code;
|
||||||
|
BOOST_LOG_TRIVIAL(debug) << "Got Headers:";
|
||||||
|
for (const auto &header : response.headers)
|
||||||
|
{
|
||||||
|
BOOST_LOG_TRIVIAL(debug) << header.first << ": " << header.second;
|
||||||
|
}
|
||||||
|
|
||||||
switch (response.code)
|
switch (response.code)
|
||||||
{
|
{
|
||||||
case 200:
|
case 200:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user