From 47b2406684683bdee02cc79ae0e0d8ce9c5d3320 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Fri, 8 Dec 2017 10:56:09 +0100 Subject: Show connection success/failure on DEBUG_L1 Clarify disconnection log message Signed-off-by: Szczepan Zalega --- device.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/device.cc b/device.cc index 5a83e2e..9321d2a 100644 --- a/device.cc +++ b/device.cc @@ -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; } -- cgit v1.2.3