diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2017-12-08 10:56:09 +0100 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2018-02-28 19:23:17 +0100 |
commit | 47b2406684683bdee02cc79ae0e0d8ce9c5d3320 (patch) | |
tree | a8eb1275cc2c27a83653ed10d52f7ccaafa539dc | |
parent | 9aa7bb5c6783d28d7d4ffe667fdfbc7400615587 (diff) | |
download | libnitrokey-47b2406684683bdee02cc79ae0e0d8ce9c5d3320.tar.gz libnitrokey-47b2406684683bdee02cc79ae0e0d8ce9c5d3320.tar.bz2 |
Show connection success/failure on DEBUG_L1
Clarify disconnection log message
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
-rw-r--r-- | device.cc | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -69,7 +69,7 @@ bool Device::_disconnect() { LOG(std::string(__FUNCTION__) + std::string(m_model == DeviceModel::PRO ? "PRO" : "STORAGE"), Loglevel::DEBUG_L2); LOG(std::string(__FUNCTION__) + std::string(" *IN* "), Loglevel::DEBUG_L2); - LOG(std::string("Disconnection success: ") + std::to_string(mp_devhandle == nullptr), Loglevel::DEBUG_L2); + LOG(std::string("Disconnection: handle already freed: ") + std::to_string(mp_devhandle == nullptr) + " ("+m_path+")", Loglevel::DEBUG_L1); if(mp_devhandle == nullptr) return false; hid_close(mp_devhandle); @@ -99,7 +99,7 @@ bool Device::_connect() { mp_devhandle = hid_open_path(m_path.c_str()); } const bool success = mp_devhandle != nullptr; - LOG(std::string("Connection success: ") + std::to_string(success), Loglevel::DEBUG_L2); + LOG(std::string("Connection success: ") + std::to_string(success) + " ("+m_path+")", Loglevel::DEBUG_L1); return success; } |