Software / code / prosody
Comparison
plugins/mod_storage_sql.lua @ 12875:a28f77018476
mod_storage_sql: Remove module status on unknown 'debug' level
Expected this to be translated to 'core', but it logs an error instead.
See previous commit.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Tue, 31 Jan 2023 07:52:33 +0100 |
| parent | 12873:7f4f834fae79 |
| child | 12977:74b9e05af71e |
comparison
equal
deleted
inserted
replaced
| 12874:b9468c8ac1d3 | 12875:a28f77018476 |
|---|---|
| 838 local sql = params.driver == "SQLite3" and sqlite or dbisql; | 838 local sql = params.driver == "SQLite3" and sqlite or dbisql; |
| 839 local db_uri = sql.db2uri(params); | 839 local db_uri = sql.db2uri(params); |
| 840 engine = engines[db_uri]; | 840 engine = engines[db_uri]; |
| 841 if not engine then | 841 if not engine then |
| 842 module:log("debug", "Creating new engine %s", db_uri); | 842 module:log("debug", "Creating new engine %s", db_uri); |
| 843 module:log_status("debug", "Creating new engine for "..params.driver); | |
| 844 engine = sql:create_engine(params, function (engine) -- luacheck: ignore 431/engine | 843 engine = sql:create_engine(params, function (engine) -- luacheck: ignore 431/engine |
| 845 if module:get_option("sql_manage_tables", true) then | 844 if module:get_option("sql_manage_tables", true) then |
| 846 -- Automatically create table, ignore failure (table probably already exists) | 845 -- Automatically create table, ignore failure (table probably already exists) |
| 847 -- FIXME: we should check in information_schema, etc. | 846 -- FIXME: we should check in information_schema, etc. |
| 848 create_table(engine); | 847 create_table(engine); |