Logs: Reduce logging IO

This commit is contained in:
Elad Ashkenazi 2024-08-31 10:53:54 +03:00
parent e56164f1e3
commit 844cc654f2
1 changed files with 2 additions and 1 deletions

View File

@ -155,7 +155,8 @@ void hid_pad_handler<Device>::enumerate_devices()
}
hid_free_enumeration(head);
}
hid_log.notice("%s enumeration found %d devices (%f ms)", m_type, device_paths.size(), timer.GetElapsedTimeInMilliSec());
(device_paths.empty() ? hid_log.trace : hid_log.notice)("%s enumeration found %d devices (%f ms)", m_type, device_paths.size(), timer.GetElapsedTimeInMilliSec());
std::lock_guard lock(m_enumeration_mutex);
m_new_enumerated_devices = device_paths;