From ef88d1a8ae704ef33a11d85aab8c15724e46bad5 Mon Sep 17 00:00:00 2001 From: Paul-Louis Ageneau Date: Tue, 12 Sep 2023 13:47:58 +0200 Subject: [PATCH] Debug logging --- src/impl/pollservice.cpp | 5 +++++ test/websocketserver.cpp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/impl/pollservice.cpp b/src/impl/pollservice.cpp index 8878e9cc0..935dc9e1e 100644 --- a/src/impl/pollservice.cpp +++ b/src/impl/pollservice.cpp @@ -97,6 +97,9 @@ void PollService::prepare(std::vector &pfds, optionalevents = POLLIN | POLLOUT; break; } + + PLOG_VERBOSE << "Poll prepare: events=" << it->events; + if (entry.until) next = next ? std::min(*next, *entry.until) : *entry.until; @@ -118,6 +121,8 @@ void PollService::process(std::vector &pfds) { auto &entry = jt->second; const auto ¶ms = entry.params; + PLOG_VERBOSE << "Poll process: events=" << it->events << ", revents=" << it->revents; + if (it->revents & POLLNVAL || it->revents & POLLERR || (it->revents & POLLIN && !(it->events & POLLIN))) { // MacOS sets unexpected POLLIN on error diff --git a/test/websocketserver.cpp b/test/websocketserver.cpp index c146f91b1..94c26d7f4 100644 --- a/test/websocketserver.cpp +++ b/test/websocketserver.cpp @@ -22,7 +22,7 @@ using namespace std; template weak_ptr make_weak_ptr(shared_ptr ptr) { return ptr; } void test_websocketserver() { - InitLogger(LogLevel::Debug); + InitLogger(LogLevel::Verbose); const string myMessage = "Hello world from client";