diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2017-03-29 12:44:33 +0200 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2017-03-29 12:49:15 +0200 |
commit | e6608fc4a3bd5adb27bcebe3e87c9fc3de789375 (patch) | |
tree | 847462f25c9ee452474c4aee178e756ebf190c51 | |
parent | c196b45789377dc2cb76a203853695928872dbb4 (diff) | |
download | libnitrokey-e6608fc4a3bd5adb27bcebe3e87c9fc3de789375.tar.gz libnitrokey-e6608fc4a3bd5adb27bcebe3e87c9fc3de789375.tar.bz2 |
Allow to directly choose loglevel
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
-rw-r--r-- | NitrokeyManager.cc | 5 | ||||
-rw-r--r-- | include/NitrokeyManager.h | 3 |
2 files changed, 7 insertions, 1 deletions
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); }; } |