diff options
author | Waqas Hussain <waqas20@gmail.com> | 2011-01-13 02:31:10 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2011-01-13 02:31:10 +0500 |
commit | 6abd0110a473a0f96bb8d7df433cdb1a966f8a4d (patch) | |
tree | 7e251a1a30383bc8658e5b2a1eb0b66bef0f8a39 | |
parent | ddde44eb046ea134888b93df74021a521b737d8a (diff) | |
download | prosody-6abd0110a473a0f96bb8d7df433cdb1a966f8a4d.tar.gz prosody-6abd0110a473a0f96bb8d7df433cdb1a966f8a4d.zip |
loggingmanager: Re-read 'debug' option on reload.
-rw-r--r-- | core/loggingmanager.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/loggingmanager.lua b/core/loggingmanager.lua index 0e0ae862..460afeaf 100644 --- a/core/loggingmanager.lua +++ b/core/loggingmanager.lua @@ -27,8 +27,6 @@ local config = require "core.configmanager"; local logger = require "util.logger"; local prosody = prosody; -local debug_mode = config.get("*", "core", "debug"); - _G.log = logger.init("general"); module "loggingmanager" @@ -166,6 +164,8 @@ function reload_logging() logger.reset(); + local debug_mode = config.get("*", "core", "debug"); + default_logging = { { to = "console" , levels = { min = (debug_mode and "debug") or "info" } } }; default_file_logging = { { to = "file", levels = { min = (debug_mode and "debug") or "info" }, timestamps = true } |