Skip to content

Commit

Permalink
enh(WebTunnel): logging
Browse files Browse the repository at this point in the history
  • Loading branch information
obiltschnig committed Nov 17, 2024
1 parent 5994094 commit 7a982c1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions WebTunnel/src/SocketDispatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ void SocketDispatcher::writable(const Poco::Net::Socket& socket, SocketDispatche
ss.shutdownSend();
if (pInfo->pendingSends.size() > 1)
{
_logger.warning("Discarding pending writes after shutdown");
_logger.debug("Discarding pending writes after shutdown");
}
pInfo->pendingSends.clear();
}
Expand Down Expand Up @@ -519,6 +519,7 @@ void SocketDispatcher::timeout(const Poco::Net::Socket& socket, SocketDispatcher

void SocketDispatcher::addSocketImpl(const Poco::Net::StreamSocket& socket, SocketHandler::Ptr pHandler, int mode, Poco::Timespan timeout)
{
_logger.trace("Adding socket %?d (%d)..."s, socket.impl()->sockfd(), mode);
mode |= Poco::Net::PollSet::POLL_ERROR;
_socketMap[socket] = new SocketInfo(pHandler, mode, timeout);
_pollSet.add(socket, mode);
Expand All @@ -530,6 +531,7 @@ void SocketDispatcher::updateSocketImpl(const Poco::Net::StreamSocket& socket, i
auto it = _socketMap.find(socket);
if (it != _socketMap.end())
{
_logger.trace("Updating socket %?d (%d -> %d)..."s, socket.impl()->sockfd(), it->second->mode, mode);
if (timeout != 0)
{
it->second->timeout = timeout;
Expand All @@ -543,7 +545,7 @@ void SocketDispatcher::updateSocketImpl(const Poco::Net::StreamSocket& socket, i

void SocketDispatcher::removeSocketImpl(const Poco::Net::StreamSocket& socket)
{
_logger.debug("Removing socket %?d...", socket.impl()->sockfd());
_logger.trace("Removing socket %?d..."s, socket.impl()->sockfd());
_socketMap.erase(socket);
try
{
Expand All @@ -557,7 +559,7 @@ void SocketDispatcher::removeSocketImpl(const Poco::Net::StreamSocket& socket)

void SocketDispatcher::closeSocketImpl(Poco::Net::StreamSocket& socket)
{
_logger.debug("Closing socket %?d...", socket.impl()->sockfd());
_logger.trace("Closing socket %?d..."s, socket.impl()->sockfd());
try
{
_pollSet.remove(socket);
Expand Down

0 comments on commit 7a982c1

Please sign in to comment.