diff options
| -rw-r--r-- | command_id.cc | 3 | ||||
| -rw-r--r-- | device.cc | 4 | ||||
| -rw-r--r-- | libnitrokey/log.h | 1 | 
3 files changed, 8 insertions, 0 deletions
| diff --git a/command_id.cc b/command_id.cc index 9a329bc..90f300f 100644 --- a/command_id.cc +++ b/command_id.cc @@ -26,6 +26,9 @@ namespace nitrokey {  namespace proto {  const char *commandid_to_string(CommandID id) { +#ifdef NO_LOG +  return ""; +#endif    switch (id) {      case CommandID::GET_STATUS:        return "GET_STATUS"; @@ -350,6 +350,10 @@ LibremKey::LibremKey():  #include <sstream>  #define p(x) ss << #x << " " << x << ", ";  std::string Device::ErrorCounters::get_as_string() { +#ifdef NO_LOG +  return ""; +#endif +    std::stringstream ss;    p(total_comm_runs);    p(communication_successful); diff --git a/libnitrokey/log.h b/libnitrokey/log.h index 278b49c..eade68f 100644 --- a/libnitrokey/log.h +++ b/libnitrokey/log.h @@ -100,6 +100,7 @@ namespace nitrokey {  #ifdef NO_LOG  #define LOG(string, level) while(false){}  #define LOGD(string) while(false){} +#define LOGD1(string) while(false){}  #else  #define LOG(string, level) nitrokey::log::Log::instance()((string), (level))  #define LOGD1(string) nitrokey::log::Log::instance()((string), (nitrokey::log::Loglevel::DEBUG_L1)) | 
