Add some debug verbosity
This commit is contained in:
parent
8701b5aef3
commit
ad3bdd0f37
1 changed files with 21 additions and 0 deletions
|
@ -24,6 +24,9 @@
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#if !defined(NDEBUG)
|
||||||
|
# include <iostream>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace sjd = simdjson::dom;
|
namespace sjd = simdjson::dom;
|
||||||
namespace sj = simdjson;
|
namespace sj = simdjson;
|
||||||
|
@ -117,6 +120,9 @@ ApiNap::ApiNap (
|
||||||
ApiNap::~ApiNap() noexcept = default;
|
ApiNap::~ApiNap() noexcept = default;
|
||||||
|
|
||||||
ApiOutput<Ping> ApiNap::ping(bool with_raw) {
|
ApiOutput<Ping> ApiNap::ping(bool with_raw) {
|
||||||
|
#if !defined(NDEBUG)
|
||||||
|
std::cout << "ApiNap::ping()\n";
|
||||||
|
#endif
|
||||||
return fetch_and_parse<Ping>(
|
return fetch_and_parse<Ping>(
|
||||||
g_endpoint_ping,
|
g_endpoint_ping,
|
||||||
[](const simdjson::dom::element& doc, Ping& out) {
|
[](const simdjson::dom::element& doc, Ping& out) {
|
||||||
|
@ -127,6 +133,9 @@ ApiOutput<Ping> ApiNap::ping(bool with_raw) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiOutput<WhoAmI> ApiNap::who_am_i(bool with_raw) {
|
ApiOutput<WhoAmI> ApiNap::who_am_i(bool with_raw) {
|
||||||
|
#if !defined(NDEBUG)
|
||||||
|
std::cout << "ApiNap::who_am_i()\n";
|
||||||
|
#endif
|
||||||
return fetch_and_parse<WhoAmI>(
|
return fetch_and_parse<WhoAmI>(
|
||||||
g_endpoint_whoami,
|
g_endpoint_whoami,
|
||||||
[](const simdjson::dom::element& doc, WhoAmI& out) {
|
[](const simdjson::dom::element& doc, WhoAmI& out) {
|
||||||
|
@ -137,6 +146,9 @@ ApiOutput<WhoAmI> ApiNap::who_am_i(bool with_raw) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiOutput<Items> ApiNap::items_list(bool with_raw) {
|
ApiOutput<Items> ApiNap::items_list(bool with_raw) {
|
||||||
|
#if !defined(NDEBUG)
|
||||||
|
std::cout << "ApiNap::items_list()\n";
|
||||||
|
#endif
|
||||||
return fetch_and_parse<Items>(
|
return fetch_and_parse<Items>(
|
||||||
g_endpoint_items_list,
|
g_endpoint_items_list,
|
||||||
[](const simdjson::dom::element& doc, Items& out) {
|
[](const simdjson::dom::element& doc, Items& out) {
|
||||||
|
@ -159,6 +171,9 @@ ApiOutput<Items> ApiNap::items_list(bool with_raw) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiOutput<Icons> ApiNap::items_icons(bool with_raw) {
|
ApiOutput<Icons> ApiNap::items_icons(bool with_raw) {
|
||||||
|
#if !defined(NDEBUG)
|
||||||
|
std::cout << "ApiNap::items_icons()\n";
|
||||||
|
#endif
|
||||||
return fetch_and_parse<Icons>(
|
return fetch_and_parse<Icons>(
|
||||||
g_endpoint_items_icons,
|
g_endpoint_items_icons,
|
||||||
[](const simdjson::dom::element& doc, Icons& out) {
|
[](const simdjson::dom::element& doc, Icons& out) {
|
||||||
|
@ -176,6 +191,9 @@ ApiOutput<Icons> ApiNap::items_icons(bool with_raw) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiOutput<Shops> ApiNap::market_list(bool with_raw) {
|
ApiOutput<Shops> ApiNap::market_list(bool with_raw) {
|
||||||
|
#if !defined(NDEBUG)
|
||||||
|
std::cout << "ApiNap::market_list()\n";
|
||||||
|
#endif
|
||||||
return fetch_and_parse<Shops>(
|
return fetch_and_parse<Shops>(
|
||||||
g_endpoint_market_list,
|
g_endpoint_market_list,
|
||||||
[](const simdjson::dom::element& doc, Shops& out) {
|
[](const simdjson::dom::element& doc, Shops& out) {
|
||||||
|
@ -227,6 +245,9 @@ ApiOutput<Shops> ApiNap::market_list(bool with_raw) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiOutput<Creators> ApiNap::fame_list(bool with_raw) {
|
ApiOutput<Creators> ApiNap::fame_list(bool with_raw) {
|
||||||
|
#if !defined(NDEBUG)
|
||||||
|
std::cout << "ApiNap::fame_list()\n";
|
||||||
|
#endif
|
||||||
return fetch_and_parse<Creators>(
|
return fetch_and_parse<Creators>(
|
||||||
g_endpoint_fame_list,
|
g_endpoint_fame_list,
|
||||||
[](const simdjson::dom::element& doc, Creators& out) {
|
[](const simdjson::dom::element& doc, Creators& out) {
|
||||||
|
|
Loading…
Reference in a new issue