diff options
author | Peter Powell <petpow@saberuk.com> | 2019-06-14 14:24:03 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2019-06-14 14:40:19 +0100 |
commit | 93a4f8178c26b0ae894d2060086f605fe22b0a3e (patch) | |
tree | 76f86a62975249d28190a7c57357b3293d921157 /src/modules/extra | |
parent | 9433e34b2133d8f1e77fea15447ba4d0259a5fb0 (diff) |
Log SQL queries at the debug log level.
This makes debugging issues easier.
Diffstat (limited to 'src/modules/extra')
-rw-r--r-- | src/modules/extra/m_mysql.cpp | 1 | ||||
-rw-r--r-- | src/modules/extra/m_pgsql.cpp | 1 | ||||
-rw-r--r-- | src/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 index 6a9f38b6c..d0ccebc47 100644 --- 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 index aef441e62..3484aeca2 100644 --- 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 index e81e99025..7807a69f0 100644 --- 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; } |