mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 16:40:05 +00:00
Add debug log statements to archive warning loading
This commit is contained in:
parent
65e3a66750
commit
8dde98d2a9
4 changed files with 29 additions and 6 deletions
|
|
@ -2,10 +2,13 @@
|
|||
|
||||
#include <scwx/provider/iem_api_provider.hpp>
|
||||
#include <scwx/network/cpr.hpp>
|
||||
#include <scwx/util/time.hpp>
|
||||
|
||||
#include <boost/algorithm/string/join.hpp>
|
||||
#include <cpr/cpr.h>
|
||||
#include <range/v3/view/cartesian_product.hpp>
|
||||
#include <range/v3/view/single.hpp>
|
||||
#include <range/v3/view/transform.hpp>
|
||||
|
||||
#if (__cpp_lib_chrono < 201907L)
|
||||
# include <date/date.h>
|
||||
|
|
@ -39,6 +42,13 @@ IemApiProvider::ListTextProducts(DateRange dates,
|
|||
# define kDateFormat "%Y-%m-%d"
|
||||
#endif
|
||||
|
||||
auto formattedDates = dates | ranges::views::transform(
|
||||
[](const std::chrono::sys_days& date)
|
||||
{ return df::format(kDateFormat, date); });
|
||||
|
||||
logger_->debug("Listing text products for: {}",
|
||||
boost::algorithm::join(formattedDates, ", "));
|
||||
|
||||
std::vector<cpr::AsyncResponse> asyncResponses {};
|
||||
|
||||
for (const auto& [date, cccc, pil] :
|
||||
|
|
@ -75,6 +85,8 @@ IemApiProvider::LoadTextProducts(const Range& textProducts)
|
|||
{
|
||||
auto parameters = cpr::Parameters {{"nolimit", "true"}};
|
||||
|
||||
logger_->debug("Loading {} text products", textProducts.size());
|
||||
|
||||
std::vector<std::pair<std::string, cpr::AsyncResponse>> asyncResponses {};
|
||||
asyncResponses.reserve(textProducts.size());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue