Software /
code /
prosody
Diff
core/loggingmanager.lua @ 4126:5044698a9d90
Merge 0.8->trunk
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 21 Jan 2011 14:02:56 +0000 |
parent | 4124:3761aa844d65 |
child | 4140:e463e1df1bda |
line wrap: on
line diff
--- a/core/loggingmanager.lua Fri Jan 21 04:36:31 2011 +0500 +++ b/core/loggingmanager.lua Fri Jan 21 14:02:56 2011 +0000 @@ -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 } @@ -195,7 +195,7 @@ -- Column width for "source" (used by stdout and console) local sourcewidth = 20; -function log_sink_types.stdout() +function log_sink_types.stdout(config) local timestamps = config.timestamps; if timestamps == true then