inspircd

A modular C++ IRC daemon (ircd). https://www.inspircd.org/
Log | Files | Refs | README

commit 93a4f8178c26b0ae894d2060086f605fe22b0a3e
parent 9433e34b2133d8f1e77fea15447ba4d0259a5fb0
Author: Peter Powell <petpow@saberuk.com>
Date:   Fri, 14 Jun 2019 14:24:03 +0100

Log SQL queries at the debug log level.

This makes debugging issues easier.

Diffstat:
Msrc/modules/extra/m_mysql.cpp | 1+
Msrc/modules/extra/m_pgsql.cpp | 1+
Msrc/modules/extra/m_sqlite3.cpp | 1+
3 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp @@ -334,6 +334,7 @@ class SQLConnection : public SQL::Provider void Submit(SQL::Query* q, const std::string& qs) CXX11_OVERRIDE { + ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Executing MySQL query: " + qs); Parent()->Dispatcher->LockQueue(); Parent()->qq.push_back(QQueueItem(q, qs, this)); Parent()->Dispatcher->UnlockQueueWakeup(); diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp @@ -418,6 +418,7 @@ restart: void Submit(SQL::Query *req, const std::string& q) CXX11_OVERRIDE { + ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Executing PostgreSQL query: " + q); if (qinprog.q.empty()) { DoQuery(QueueItem(req,q)); diff --git a/src/modules/extra/m_sqlite3.cpp b/src/modules/extra/m_sqlite3.cpp @@ -174,6 +174,7 @@ class SQLConn : public SQL::Provider void Submit(SQL::Query* query, const std::string& q) CXX11_OVERRIDE { + ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Executing SQLite3 query: " + q); Query(query, q); delete query; }