[idd] logging: make periodic statistics opt-in

This commit is contained in:
Geoffrey McRae
2026-08-14 02:47:56 +10:00
parent 879b8429e7
commit caf8515e9d
8 changed files with 78 additions and 54 deletions

View File

@@ -21,6 +21,7 @@
#include "CInputPipeClient.h"
#include "CDebug.h"
#include "config/CSettings.h"
#include "InputPipeProtocol.h"
#include "../CHIDDevice.h"
#include "../HIDReports.h"
@@ -335,7 +336,8 @@ void CInputPipeClient::LogStatistics(bool force)
m_statSubmitFailed = 0;
m_lastStatistics = now;
if (received || malformed || sequenceResets || submitFailed)
if ((received || malformed || sequenceResets || submitFailed) &&
CSettings::ShouldLogStatistics())
{
DEBUG_TRACE("LGInput pipe receive: %llu reports, %llu malformed, "
"%llu sequence resets, %llu HID submit failures",