Add some debug verbosity

This commit is contained in:
King_DuckZ 2020-09-12 00:41:44 +01:00
parent 8701b5aef3
commit ad3bdd0f37

View file

@ -24,6 +24,9 @@
#include <algorithm>
#include <cctype>
#include <cassert>
#if !defined(NDEBUG)
# include <iostream>
#endif
namespace sjd = simdjson::dom;
namespace sj = simdjson;
@ -117,6 +120,9 @@ ApiNap::ApiNap (
ApiNap::~ApiNap() noexcept = default;
ApiOutput<Ping> ApiNap::ping(bool with_raw) {
#if !defined(NDEBUG)
std::cout << "ApiNap::ping()\n";
#endif
return fetch_and_parse<Ping>(
g_endpoint_ping,
[](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) {
#if !defined(NDEBUG)
std::cout << "ApiNap::who_am_i()\n";
#endif
return fetch_and_parse<WhoAmI>(
g_endpoint_whoami,
[](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) {
#if !defined(NDEBUG)
std::cout << "ApiNap::items_list()\n";
#endif
return fetch_and_parse<Items>(
g_endpoint_items_list,
[](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) {
#if !defined(NDEBUG)
std::cout << "ApiNap::items_icons()\n";
#endif
return fetch_and_parse<Icons>(
g_endpoint_items_icons,
[](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) {
#if !defined(NDEBUG)
std::cout << "ApiNap::market_list()\n";
#endif
return fetch_and_parse<Shops>(
g_endpoint_market_list,
[](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) {
#if !defined(NDEBUG)
std::cout << "ApiNap::fame_list()\n";
#endif
return fetch_and_parse<Creators>(
g_endpoint_fame_list,
[](const simdjson::dom::element& doc, Creators& out) {