From ad3bdd0f37027a9866743f19eb5db95028e1aa32 Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Sat, 12 Sep 2020 00:41:44 +0100 Subject: [PATCH] Add some debug verbosity --- src/oro/api_nap.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/oro/api_nap.cpp b/src/oro/api_nap.cpp index 5b77629..3b6e48c 100644 --- a/src/oro/api_nap.cpp +++ b/src/oro/api_nap.cpp @@ -24,6 +24,9 @@ #include #include #include +#if !defined(NDEBUG) +# include +#endif namespace sjd = simdjson::dom; namespace sj = simdjson; @@ -117,6 +120,9 @@ ApiNap::ApiNap ( ApiNap::~ApiNap() noexcept = default; ApiOutput ApiNap::ping(bool with_raw) { +#if !defined(NDEBUG) + std::cout << "ApiNap::ping()\n"; +#endif return fetch_and_parse( g_endpoint_ping, [](const simdjson::dom::element& doc, Ping& out) { @@ -127,6 +133,9 @@ ApiOutput ApiNap::ping(bool with_raw) { } ApiOutput ApiNap::who_am_i(bool with_raw) { +#if !defined(NDEBUG) + std::cout << "ApiNap::who_am_i()\n"; +#endif return fetch_and_parse( g_endpoint_whoami, [](const simdjson::dom::element& doc, WhoAmI& out) { @@ -137,6 +146,9 @@ ApiOutput ApiNap::who_am_i(bool with_raw) { } ApiOutput ApiNap::items_list(bool with_raw) { +#if !defined(NDEBUG) + std::cout << "ApiNap::items_list()\n"; +#endif return fetch_and_parse( g_endpoint_items_list, [](const simdjson::dom::element& doc, Items& out) { @@ -159,6 +171,9 @@ ApiOutput ApiNap::items_list(bool with_raw) { } ApiOutput ApiNap::items_icons(bool with_raw) { +#if !defined(NDEBUG) + std::cout << "ApiNap::items_icons()\n"; +#endif return fetch_and_parse( g_endpoint_items_icons, [](const simdjson::dom::element& doc, Icons& out) { @@ -176,6 +191,9 @@ ApiOutput ApiNap::items_icons(bool with_raw) { } ApiOutput ApiNap::market_list(bool with_raw) { +#if !defined(NDEBUG) + std::cout << "ApiNap::market_list()\n"; +#endif return fetch_and_parse( g_endpoint_market_list, [](const simdjson::dom::element& doc, Shops& out) { @@ -227,6 +245,9 @@ ApiOutput ApiNap::market_list(bool with_raw) { } ApiOutput ApiNap::fame_list(bool with_raw) { +#if !defined(NDEBUG) + std::cout << "ApiNap::fame_list()\n"; +#endif return fetch_and_parse( g_endpoint_fame_list, [](const simdjson::dom::element& doc, Creators& out) {