diff options
author | Matthew Wild <mwild1@gmail.com> | 2019-03-20 12:45:58 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2019-03-20 12:45:58 +0000 |
commit | 798be44f563b8764dad50e893f4b25268b42e5a8 (patch) | |
tree | 6fc697a3bd02fdd5dd158695927f0e299830360a /util/startup.lua | |
parent | eb63c91d91f503946fe9aa731d975f0b289e6065 (diff) | |
download | prosody-798be44f563b8764dad50e893f4b25268b42e5a8.tar.gz prosody-798be44f563b8764dad50e893f4b25268b42e5a8.zip |
util.startup: Log configuration warnings at startup
Diffstat (limited to 'util/startup.lua')
-rw-r--r-- | util/startup.lua | 6 |
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() |