# HG changeset patch # User Kim Alvefur # Date 1564446224 -7200 # Node ID c59d384b0959e5a703272ec8089d7236a71d6b5e # Parent 659ffa03f1e7074c4d256bb6f0167561b6e392a9 util.sql: Remove tostring call from logging Taken care of by loggingmanager now diff -r 659ffa03f1e7 -r c59d384b0959 util/sql.lua --- a/util/sql.lua Tue Jul 30 02:23:06 2019 +0200 +++ b/util/sql.lua Tue Jul 30 02:23:44 2019 +0200 @@ -201,18 +201,18 @@ if not ok then return ok, err; end end --assert(not self.__transaction, "Recursive transactions not allowed"); - log("debug", "SQL transaction begin [%s]", tostring(func)); + log("debug", "SQL transaction begin [%s]", func); self.__transaction = true; local success, a, b, c = xpcall(func, handleerr, ...); self.__transaction = nil; if success then - log("debug", "SQL transaction success [%s]", tostring(func)); + log("debug", "SQL transaction success [%s]", func); local ok, err = self.conn:commit(); -- LuaDBI doesn't actually return an error message here, just a boolean if not ok then return ok, err or "commit failed"; end return success, a, b, c; else - log("debug", "SQL transaction failure [%s]: %s", tostring(func), a.err); + log("debug", "SQL transaction failure [%s]: %s", func, a.err); if self.conn then self.conn:rollback(); end return success, a.err; end @@ -224,7 +224,7 @@ if not conn or not conn:ping() then log("debug", "Database connection was closed. Will reconnect and retry."); self.conn = nil; - log("debug", "Retrying SQL transaction [%s]", tostring((...))); + log("debug", "Retrying SQL transaction [%s]", (...)); ok, ret = self:_transaction(...); log("debug", "SQL transaction retry %s", ok and "succeeded" or "failed"); else