diff options
| author | 2022-01-18 03:30:22 +0000 | |
|---|---|---|
| committer | 2022-05-01 22:07:14 +0100 | |
| commit | e23ee3fde17a6bb17a9e56c7105f4bbceb36391f (patch) | |
| tree | b5117aa2cc0fe2bee18df3a5dabf0ecc49dbd30e /src/modules/extra/m_pgsql.cpp | |
| parent | Rewrite the entire logging system. (diff) | |
Rewrite logging calls to use the new APIs.
Diffstat (limited to 'src/modules/extra/m_pgsql.cpp')
| -rw-r--r-- | src/modules/extra/m_pgsql.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp index aebf2db8f..86dcfe6ce 100644 --- a/src/modules/extra/m_pgsql.cpp +++ b/src/modules/extra/m_pgsql.cpp @@ -273,7 +273,7 @@ public: bool HandleConnectError(const char* reason) { - ServerInstance->Logs.Log(MODNAME, LOG_DEFAULT, "Could not connect to the \"%s\" database: %s", + ServerInstance->Logs.Normal(MODNAME, "Could not connect to the \"%s\" database: %s", GetId().c_str(), reason); return false; } @@ -419,7 +419,7 @@ restart: void Submit(SQL::Query *req, const std::string& q) override { - ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "Executing PostgreSQL query: " + q); + ServerInstance->Logs.Debug(MODNAME, "Executing PostgreSQL query: " + q); if (qinprog.q.empty()) { DoQuery(QueueItem(req,q)); @@ -448,7 +448,7 @@ restart: int error; size_t escapedsize = PQescapeStringConn(sql, &buffer[0], parm.data(), parm.length(), &error); if (error) - ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "BUG: Apparently PQescapeStringConn() failed"); + ServerInstance->Logs.Debug(MODNAME, "BUG: Apparently PQescapeStringConn() failed"); res.append(&buffer[0], escapedsize); } } @@ -479,7 +479,7 @@ restart: int error; size_t escapedsize = PQescapeStringConn(sql, &buffer[0], parm.data(), parm.length(), &error); if (error) - ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "BUG: Apparently PQescapeStringConn() failed"); + ServerInstance->Logs.Debug(MODNAME, "BUG: Apparently PQescapeStringConn() failed"); res.append(&buffer[0], escapedsize); } } |
