Skip to content

Commit

Permalink
Show connection success/failure on DEBUG_L1
Browse files Browse the repository at this point in the history
Clarify disconnection log message

Signed-off-by: Szczepan Zalega <[email protected]>
  • Loading branch information
szszszsz committed Feb 28, 2018
1 parent 9aa7bb5 commit 47b2406
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions device.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 47b2406

Please sign in to comment.