aboutsummaryrefslogtreecommitdiffstats
path: root/src/socketengines/poll.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-01-23 23:48:09 +0000
committerGravatar Sadie Powell2023-01-24 00:12:57 +0000
commit206d31de85192353d03c74766e80513a87dc49b4 (patch)
tree24fdee802c85c29b66a04901147d019e92e30931 /src/socketengines/poll.cpp
parentConvert WriteToSnoMask/WriteGlobalSno to use fmtlib format strings. (diff)
Convert log calls to use fmtlib format strings
Diffstat (limited to 'src/socketengines/poll.cpp')
-rw-r--r--src/socketengines/poll.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/socketengines/poll.cpp b/src/socketengines/poll.cpp
index 807d89c94..b28f120c8 100644
--- a/src/socketengines/poll.cpp
+++ b/src/socketengines/poll.cpp
@@ -68,13 +68,13 @@ bool SocketEngine::AddFd(EventHandler* eh, int event_mask)
int fd = eh->GetFd();
if (!eh->HasFd())
{
- ServerInstance->Logs.Debug("SOCKET", "AddFd out of range: (fd: %d)", fd);
+ ServerInstance->Logs.Debug("SOCKET", "AddFd out of range: (fd: {})", fd);
return false;
}
if (static_cast<unsigned int>(fd) < fd_mappings.size() && fd_mappings[fd] != -1)
{
- ServerInstance->Logs.Debug("SOCKET", "Attempt to add duplicate fd: %d", fd);
+ ServerInstance->Logs.Debug("SOCKET", "Attempt to add duplicate fd: {}", fd);
return false;
}
@@ -82,7 +82,7 @@ bool SocketEngine::AddFd(EventHandler* eh, int event_mask)
if (!SocketEngine::AddFdRef(eh))
{
- ServerInstance->Logs.Debug("SOCKET", "Attempt to add duplicate fd: %d", fd);
+ ServerInstance->Logs.Debug("SOCKET", "Attempt to add duplicate fd: {}", fd);
return false;
}
@@ -94,7 +94,7 @@ bool SocketEngine::AddFd(EventHandler* eh, int event_mask)
events[index].fd = fd;
events[index].events = mask_to_poll(event_mask);
- ServerInstance->Logs.Debug("SOCKET", "New file descriptor: %d (%d; index %d)", fd, events[index].events, index);
+ ServerInstance->Logs.Debug("SOCKET", "New file descriptor: {} ({}; index {})", fd, events[index].events, index);
eh->SetEventMask(event_mask);
return true;
}
@@ -104,7 +104,7 @@ void SocketEngine::OnSetEvent(EventHandler* eh, int old_mask, int new_mask)
int fd = eh->GetFd();
if (!eh->HasFd() || static_cast<unsigned int>(fd) >= fd_mappings.size() || fd_mappings[fd] == -1)
{
- ServerInstance->Logs.Debug("SOCKET", "SetEvents() on unknown fd: %d", eh->GetFd());
+ ServerInstance->Logs.Debug("SOCKET", "SetEvents() on unknown fd: {}", eh->GetFd());
return;
}
@@ -116,13 +116,13 @@ void SocketEngine::DelFd(EventHandler* eh)
int fd = eh->GetFd();
if (!eh->HasFd())
{
- ServerInstance->Logs.Debug("SOCKET", "DelFd out of range: (fd: %d)", fd);
+ ServerInstance->Logs.Debug("SOCKET", "DelFd out of range: (fd: {})", fd);
return;
}
if (static_cast<unsigned int>(fd) >= fd_mappings.size() || fd_mappings[fd] == -1)
{
- ServerInstance->Logs.Debug("SOCKET", "DelFd() on unknown fd: %d", fd);
+ ServerInstance->Logs.Debug("SOCKET", "DelFd() on unknown fd: {}", fd);
return;
}
@@ -150,8 +150,8 @@ void SocketEngine::DelFd(EventHandler* eh)
SocketEngine::DelFdRef(eh);
- ServerInstance->Logs.Debug("SOCKET", "Remove file descriptor: %d (index: %d) "
- "(Filled gap with: %d (index: %d))", fd, index, last_fd, last_index);
+ ServerInstance->Logs.Debug("SOCKET", "Remove file descriptor: {} (index: {}) "
+ "(Filled gap with: {} (index: {}))", fd, index, last_fd, last_index);
}
int SocketEngine::DispatchEvents()