From 415a9cb821fb9d4fb91850d812a529529ff18142 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 28 Feb 2024 11:17:36 +1000 Subject: [PATCH] lib: drop raw protocol write/read messages to DEBUG5 These are quite noisy and by the time we have errors in the actual protocol mapping we should have ruled out anything above already. --- src/lib/inputleap/ProtocolUtil.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/lib/inputleap/ProtocolUtil.cpp b/src/lib/inputleap/ProtocolUtil.cpp index f7affc6ab..1b0be05ba 100644 --- a/src/lib/inputleap/ProtocolUtil.cpp +++ b/src/lib/inputleap/ProtocolUtil.cpp @@ -33,7 +33,7 @@ ProtocolUtil::writef(inputleap::IStream* stream, const char* fmt, ...) { assert(stream != nullptr); assert(fmt != nullptr); - LOG_DEBUG2("writef(%s)", fmt); + LOG_DEBUG5("writef(%s)", fmt); va_list args; va_start(args, fmt); @@ -49,7 +49,7 @@ ProtocolUtil::readf(inputleap::IStream* stream, const char* fmt, ...) { assert(stream != nullptr); assert(fmt != nullptr); - LOG_DEBUG2("readf(%s)", fmt); + LOG_DEBUG5("readf(%s)", fmt); bool result; va_list args; @@ -83,7 +83,7 @@ void ProtocolUtil::vwritef(inputleap::IStream* stream, const char* fmt, std::uin try { // write buffer stream->write(buffer, size); - LOG_DEBUG2("wrote %d bytes", size); + LOG_DEBUG5("wrote %d bytes", size); delete[] buffer; } @@ -120,7 +120,7 @@ ProtocolUtil::vreadf(inputleap::IStream* stream, const char* fmt, va_list args) case 1: // 1 byte integer *static_cast(v) = buffer[0]; - LOG_DEBUG2("readf: read %d byte integer: %d (0x%x)", len, + LOG_DEBUG5("readf: read %d byte integer: %d (0x%x)", len, *static_cast(v), *static_cast(v)); break; @@ -130,7 +130,7 @@ ProtocolUtil::vreadf(inputleap::IStream* stream, const char* fmt, va_list args) static_cast( (static_cast(buffer[0]) << 8) | static_cast(buffer[1])); - LOG_DEBUG2("readf: read %d byte integer: %d (0x%x)", len, + LOG_DEBUG5("readf: read %d byte integer: %d (0x%x)", len, *static_cast(v), *static_cast(v)); break; @@ -141,7 +141,7 @@ ProtocolUtil::vreadf(inputleap::IStream* stream, const char* fmt, va_list args) (static_cast(buffer[1]) << 16) | (static_cast(buffer[2]) << 8) | static_cast(buffer[3]); - LOG_DEBUG2("readf: read %d byte integer: %d (0x%x)", len, + LOG_DEBUG5("readf: read %d byte integer: %d (0x%x)", len, *static_cast(v), *static_cast(v)); break; default: @@ -175,7 +175,7 @@ ProtocolUtil::vreadf(inputleap::IStream* stream, const char* fmt, va_list args) read(stream, buffer, 1); static_cast*>(v)->push_back( buffer[0]); - LOG_DEBUG2("readf: read %d byte integer[%d]: %d (0x%x)", len, i, + LOG_DEBUG5("readf: read %d byte integer[%d]: %d (0x%x)", len, i, static_cast*>(v)->back(), static_cast*>(v)->back()); } @@ -189,7 +189,7 @@ ProtocolUtil::vreadf(inputleap::IStream* stream, const char* fmt, va_list args) static_cast( (static_cast(buffer[0]) << 8) | static_cast(buffer[1]))); - LOG_DEBUG2("readf: read %d byte integer[%d]: %d (0x%x)", len, i, + LOG_DEBUG5("readf: read %d byte integer[%d]: %d (0x%x)", len, i, static_cast*>(v)->back(), static_cast*>(v)->back()); } @@ -204,7 +204,7 @@ ProtocolUtil::vreadf(inputleap::IStream* stream, const char* fmt, va_list args) (static_cast(buffer[1]) << 16) | (static_cast(buffer[2]) << 8) | static_cast(buffer[3])); - LOG_DEBUG2("readf: read %d byte integer[%d]: %d (0x%x)", len, i, + LOG_DEBUG5("readf: read %d byte integer[%d]: %d (0x%x)", len, i, static_cast*>(v)->back(), static_cast*>(v)->back()); } @@ -250,7 +250,7 @@ ProtocolUtil::vreadf(inputleap::IStream* stream, const char* fmt, va_list args) throw; } - LOG_DEBUG2("readf: read %d byte string", str_len); + LOG_DEBUG5("readf: read %d byte string", str_len); // save the data std::string* dst = va_arg(args, std::string*);