# HG changeset patch # User Matthew Wild # Date 1245428536 -3600 # Node ID a0bee511d144fce4ad0d5a272d0f8f4f336fb8c5 # Parent 947d94e3619f7cfa5b4b7ec60c163cf127cf5c7f loggingmanager: Enable debug level for default file logging when 'debug' mode is enabled in the config diff -r 947d94e3619f -r a0bee511d144 core/loggingmanager.lua --- a/core/loggingmanager.lua Fri Jun 12 15:43:24 2009 +0100 +++ b/core/loggingmanager.lua Fri Jun 19 17:22:16 2009 +0100 @@ -12,6 +12,7 @@ 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 @@ -- 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;