Skip to content

Commit

Permalink
Debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
paullouisageneau committed Sep 12, 2023
1 parent 9dcd9ed commit ef88d1a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/impl/pollservice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ void PollService::prepare(std::vector<struct pollfd> &pfds, optional<clock::time
it->events = POLLIN | POLLOUT;
break;
}

PLOG_VERBOSE << "Poll prepare: events=" << it->events;

if (entry.until)
next = next ? std::min(*next, *entry.until) : *entry.until;

Expand All @@ -118,6 +121,8 @@ void PollService::process(std::vector<struct pollfd> &pfds) {
auto &entry = jt->second;
const auto &params = 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
Expand Down
2 changes: 1 addition & 1 deletion test/websocketserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ using namespace std;
template <class T> weak_ptr<T> make_weak_ptr(shared_ptr<T> ptr) { return ptr; }

void test_websocketserver() {
InitLogger(LogLevel::Debug);
InitLogger(LogLevel::Verbose);

const string myMessage = "Hello world from client";

Expand Down

0 comments on commit ef88d1a

Please sign in to comment.