diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_storage_sql.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua index 45fda70d..824bcf14 100644 --- a/plugins/mod_storage_sql.lua +++ b/plugins/mod_storage_sql.lua @@ -840,6 +840,7 @@ function module.load() engine = engines[db_uri]; if not engine then module:log("debug", "Creating new engine %s", db_uri); + module:log_status("debug", "Creating new engine for "..params.driver); engine = sql:create_engine(params, function (engine) -- luacheck: ignore 431/engine if module:get_option("sql_manage_tables", true) then -- Automatically create table, ignore failure (table probably already exists) @@ -858,8 +859,13 @@ function module.load() end end end + module:set_status("info", "Connected to " .. engine.params.driver); + end, function (engine) + module:set_status("error", "Disconnected from " .. engine.params.driver); end); engines[sql.db2uri(params)] = engine; + else + module:set_status("info", "Using existing engine"); end module:provides("storage", driver); |