Only print ping stuff in debug
This commit is contained in:
parent
3dc0f849b5
commit
abc5441a50
1 changed files with 7 additions and 1 deletions
|
@ -22,7 +22,9 @@
|
|||
#include "app_config.hpp"
|
||||
#include "duckhandy/int_conv.hpp"
|
||||
#include "duckhandy/string_bt.hpp"
|
||||
#include <iostream>
|
||||
#if !defined(NDEBUG)
|
||||
# include <iostream>
|
||||
#endif
|
||||
#if defined(OROTOOL_WITH_RESTCCPP)
|
||||
# include <restc-cpp/error.h>
|
||||
#endif
|
||||
|
@ -31,6 +33,7 @@ namespace {
|
|||
void print_ping(oro::Api& oro_api) {
|
||||
auto ping = oro_api.ping(false);
|
||||
|
||||
#if !defined(NDEBUG)
|
||||
std::cout << "date: " << ping.header.date << '\n';
|
||||
std::cout << "rate limit: " << ping.header.rate_limit << '\n';
|
||||
std::cout << "remaining: " << ping.header.rate_limit_remaining << '\n';
|
||||
|
@ -41,6 +44,9 @@ namespace {
|
|||
std::cout << "timestamp: " << ping.data.generation_timestamp << '\n';
|
||||
std::cout << "answer: " << ping.data.message << '\n';
|
||||
std::cout << "version: " << ping.data.version << '\n';
|
||||
#else
|
||||
static_cast<void>(ping);
|
||||
#endif
|
||||
}
|
||||
|
||||
constexpr auto app_version() {
|
||||
|
|
Loading…
Reference in a new issue