loggingmanager: Re-read 'debug' option on reload.
--- a/core/loggingmanager.lua Tue Jan 11 22:40:09 2011 +0000
+++ b/core/loggingmanager.lua Thu Jan 13 02:31:10 2011 +0500
@@ -27,8 +27,6 @@
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 @@
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 }