Mercurial > prosody-hg
comparison core/loggingmanager.lua @ 3018:d7c80d23ed21
loggingmanager: Enable debug level for default console logging when 'debug' mode is enabled in the config.
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Thu, 06 May 2010 15:52:47 +0500 |
| parents | b7049746bd29 |
| children | 6b2e4b581717 1fadbb2e3ca0 |
comparison
equal
deleted
inserted
replaced
| 2983:1d3355552e3d | 3018:d7c80d23ed21 |
|---|---|
| 31 _G.log = logger.init("general"); | 31 _G.log = logger.init("general"); |
| 32 | 32 |
| 33 module "loggingmanager" | 33 module "loggingmanager" |
| 34 | 34 |
| 35 -- The log config used if none specified in the config file | 35 -- The log config used if none specified in the config file |
| 36 local default_logging = { { to = "console" } }; | 36 local default_logging = { { to = "console" , levels = { min = (debug_mode and "debug") or "info" } } }; |
| 37 local default_file_logging = { { to = "file", levels = { min = (debug_mode and "debug") or "info" }, timestamps = true } }; | 37 local default_file_logging = { { to = "file", levels = { min = (debug_mode and "debug") or "info" }, timestamps = true } }; |
| 38 local default_timestamp = "%b %d %H:%M:%S"; | 38 local default_timestamp = "%b %d %H:%M:%S"; |
| 39 -- The actual config loggingmanager is using | 39 -- The actual config loggingmanager is using |
| 40 local logging_config = config.get("*", "core", "log") or default_logging; | 40 local logging_config = config.get("*", "core", "log") or default_logging; |
| 41 | 41 |
