From e6608fc4a3bd5adb27bcebe3e87c9fc3de789375 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Wed, 29 Mar 2017 12:44:33 +0200 Subject: Allow to directly choose loglevel Signed-off-by: Szczepan Zalega --- NitrokeyManager.cc | 5 +++++ include/NitrokeyManager.h | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc index ec74f18..eeda537 100644 --- a/NitrokeyManager.cc +++ b/NitrokeyManager.cc @@ -157,6 +157,10 @@ namespace nitrokey{ return false; } + void NitrokeyManager::set_loglevel(Loglevel loglevel) { + Log::instance().set_loglevel(loglevel); + } + void NitrokeyManager::set_debug(bool state) { if (state){ Log::instance().set_loglevel(Loglevel::DEBUG); @@ -845,4 +849,5 @@ namespace nitrokey{ return data.data().SD_Card_Size_u8; } + } diff --git a/include/NitrokeyManager.h b/include/NitrokeyManager.h index 9afe995..7550998 100644 --- a/include/NitrokeyManager.h +++ b/include/NitrokeyManager.h @@ -167,10 +167,11 @@ namespace nitrokey { uint64_t counter_or_interval, bool use_8_digits, bool use_enter, bool use_tokenID, const char *token_ID, const char *temporary_password) const; - bool _disconnect_no_lock(); + public: bool set_current_device_speed(int retry_delay, int send_receive_delay); + void set_loglevel(Loglevel loglevel); }; } -- cgit v1.2.3