Software /
code /
prosody
Changeset
1347:4eccafa3609f
Merge with waqas via albert!
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 19 Jun 2009 17:32:01 +0100 |
parents | 1345:35b5686d73ea (diff) 1346:e34f9455b779 (current diff) |
children | 1362:75c39ac6efa0 |
files | |
diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/core/loggingmanager.lua Sat Jun 13 00:07:16 2009 +0500 +++ b/core/loggingmanager.lua Fri Jun 19 17:32:01 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" }, timestamps = true } }; local default_timestamp = "%b %d %T"; -- The actual config loggingmanager is using local logging_config = config.get("*", "core", "log") or default_logging;