aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-06-19 17:22:16 +0100
committerMatthew Wild <mwild1@gmail.com>2009-06-19 17:22:16 +0100
commitfcb0996a5f75121b7470e013ed08e3fb191a908d (patch)
tree3e3cfb1f2ca892d8fb5173fbe8e72bbf6a7d45ec /core
parent5d8c612e5c71f4deb1b9e8c13f412a0868dfebd9 (diff)
downloadprosody-fcb0996a5f75121b7470e013ed08e3fb191a908d.tar.gz
prosody-fcb0996a5f75121b7470e013ed08e3fb191a908d.zip
loggingmanager: Enable debug level for default file logging when 'debug' mode is enabled in the config
Diffstat (limited to 'core')
-rw-r--r--core/loggingmanager.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/loggingmanager.lua b/core/loggingmanager.lua
index aa8f368d..a8f6e1dc 100644
--- a/core/loggingmanager.lua
+++ b/core/loggingmanager.lua
@@ -12,6 +12,7 @@ local getstyle, getstring = require "util.termcolours".getstyle, require "util.t
local config = require "core.configmanager";
local eventmanager = require "core.eventmanager";
local logger = require "util.logger";
+local debug_mode = config.get("*", "core", "debug");
_G.log = logger.init("general");
@@ -19,7 +20,7 @@ module "loggingmanager"
-- The log config used if none specified in the config file
local default_logging = { { to = "console" } };
-local default_file_logging = { { to = "file", levels = { min = "info" } } };
+local default_file_logging = { { to = "file", levels = { min = (debug_mode and "debug") or "info" } } };
local default_timestamp = "%b %d %T";
-- The actual config loggingmanager is using
local logging_config = config.get("*", "core", "log") or default_logging;