diff options
author | Sadie Powell <sadie@witchery.services> | 2020-04-09 00:14:59 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2020-04-09 00:14:59 +0100 |
commit | 0e7e1ea3935e48a5093be4ccf2371a344f30bba0 (patch) | |
tree | 86b4fa350cd4d6a6cb183b9bd918c0c74f230d93 /src | |
parent | 338946c969a34a41e7744696e875862027a9cf28 (diff) |
Improve the logging of the httpd module.
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_httpd.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp index 978a60ab7..7b2487d1c 100644 --- a/src/modules/m_httpd.cpp +++ b/src/modules/m_httpd.cpp @@ -95,6 +95,7 @@ class HttpServerSocket : public BufferedSocket, public Timer, public insp::intru { if (!messagecomplete) { + ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "HTTP socket %d timed out", GetFd()); Close(); return false; } @@ -229,6 +230,8 @@ class HttpServerSocket : public BufferedSocket, public Timer, public insp::intru // IOHook may have errored if (!getError().empty()) { + ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "HTTP socket %d encountered a hook error: %s", + GetFd(), getError().c_str()); Close(); return; } @@ -254,8 +257,10 @@ class HttpServerSocket : public BufferedSocket, public Timer, public insp::intru ServerInstance->GlobalCulls.AddItem(this); } - void OnError(BufferedSocketError) CXX11_OVERRIDE + void OnError(BufferedSocketError err) CXX11_OVERRIDE { + ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "HTTP socket %d encountered an error: %d - %s", + GetFd(), err, getError().c_str()); Close(); } |