aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2019-03-20 12:45:58 +0000
committerMatthew Wild <mwild1@gmail.com>2019-03-20 12:45:58 +0000
commit6fc745f13a6ac47780c67a7e9efceb9b8785ada4 (patch)
tree6fc697a3bd02fdd5dd158695927f0e299830360a
parent7dfdcd5e09abe4165e13e6a741f8e04cf3e6082d (diff)
downloadprosody-6fc745f13a6ac47780c67a7e9efceb9b8785ada4.tar.gz
prosody-6fc745f13a6ac47780c67a7e9efceb9b8785ada4.zip
util.startup: Log configuration warnings at startup
-rw-r--r--util/startup.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/util/startup.lua b/util/startup.lua
index 4d3c6e4e..966f2934 100644
--- a/util/startup.lua
+++ b/util/startup.lua
@@ -7,6 +7,7 @@ local logger = require "util.logger";
local log = logger.init("startup");
local config = require "core.configmanager";
+local config_warnings;
local dependencies = require "util.dependencies";
@@ -64,6 +65,8 @@ function startup.read_config()
print("**************************");
print("");
os.exit(1);
+ elseif err and #err > 0 then
+ config_warnings = err;
end
prosody.config_loaded = true;
end
@@ -98,6 +101,9 @@ end
function startup.log_startup_warnings()
dependencies.log_warnings();
+ for _, warning in ipairs(config_warnings) do
+ log("warn", "Configuration warning: %s", warning);
+ end
end
function startup.sanity_check()