Software / code / prosody
Comparison
plugins/mod_storage_sql.lua @ 7173:d8c060615aa1
mod_storage_sql: Lower message about new engine creation to debug level
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 21 Feb 2016 19:01:26 +0100 |
| parent | 7170:fb37aece3252 |
| child | 7175:3e7c69190193 |
comparison
equal
deleted
inserted
replaced
| 7172:32b74ad54432 | 7173:d8c060615aa1 |
|---|---|
| 451 if prosody.prosodyctl then return; end | 451 if prosody.prosodyctl then return; end |
| 452 local engines = module:shared("/*/sql/connections"); | 452 local engines = module:shared("/*/sql/connections"); |
| 453 local params = normalize_params(module:get_option("sql", default_params)); | 453 local params = normalize_params(module:get_option("sql", default_params)); |
| 454 engine = engines[sql.db2uri(params)]; | 454 engine = engines[sql.db2uri(params)]; |
| 455 if not engine then | 455 if not engine then |
| 456 module:log("info", "Creating new engine"); | 456 module:log("debug", "Creating new engine"); |
| 457 engine = sql:create_engine(params, function (engine) | 457 engine = sql:create_engine(params, function (engine) |
| 458 if module:get_option("sql_manage_tables", true) then | 458 if module:get_option("sql_manage_tables", true) then |
| 459 -- Automatically create table, ignore failure (table probably already exists) | 459 -- Automatically create table, ignore failure (table probably already exists) |
| 460 -- FIXME: we should check in information_schema, etc. | 460 -- FIXME: we should check in information_schema, etc. |
| 461 create_table(); | 461 create_table(); |