Mercurial > prosody-hg
view plugins/mod_debug_sql.lua @ 14099:b5002c87db0b
util.termcolours: Remove leftovers of conhost text painting
Remove code that was painting the Prosody log using Windows Console Host
functions. Windows has native support of ANSI colors for a decade, so we don't
need this anymore.
| author | Vitaly Orekhov <vkvo2000@vivaldi.net> |
|---|---|
| date | Sun, 08 Mar 2026 19:30:54 +0300 |
| parents | 5edb0d01a94f |
| children |
line wrap: on
line source
-- Enables SQL query logging -- -- luacheck: ignore 213/uri module:set_global(); local engines = module:shared("/*/sql/connections"); for uri, engine in pairs(engines) do engine:debug(true); end setmetatable(engines, { __newindex = function (t, uri, engine) engine:debug(true); rawset(t, uri, engine); end }); function module.unload() setmetatable(engines, nil); for uri, engine in pairs(engines) do engine:debug(false); end end
