Log SQL queries at the debug log level.

This makes debugging issues easier.
This commit is contained in:
Peter Powell 2019-06-14 14:24:03 +01:00
parent 9433e34b21
commit 93a4f8178c
3 changed files with 3 additions and 0 deletions

View File

@ -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();

View File

@ -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));

View File

@ -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;
}