Mercurial > prosody-hg
comparison core/loggingmanager.lua @ 5377:898454038524
core.*: Complete removal of all traces of the "core" section and section-related code.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sat, 23 Mar 2013 02:33:15 +0100 |
| parents | 1e555909f23d |
| children | bd0ff8ae98a8 |
comparison
equal
deleted
inserted
replaced
| 5376:ba9be0be4bbb | 5377:898454038524 |
|---|---|
| 144 log_sink_types[name] = nil; | 144 log_sink_types[name] = nil; |
| 145 end | 145 end |
| 146 | 146 |
| 147 logger.reset(); | 147 logger.reset(); |
| 148 | 148 |
| 149 local debug_mode = config.get("*", "core", "debug"); | 149 local debug_mode = config.get("*", "debug"); |
| 150 | 150 |
| 151 default_logging = { { to = "console" , levels = { min = (debug_mode and "debug") or "info" } } }; | 151 default_logging = { { to = "console" , levels = { min = (debug_mode and "debug") or "info" } } }; |
| 152 default_file_logging = { | 152 default_file_logging = { |
| 153 { to = "file", levels = { min = (debug_mode and "debug") or "info" }, timestamps = true } | 153 { to = "file", levels = { min = (debug_mode and "debug") or "info" }, timestamps = true } |
| 154 }; | 154 }; |
| 155 default_timestamp = "%b %d %H:%M:%S"; | 155 default_timestamp = "%b %d %H:%M:%S"; |
| 156 | 156 |
| 157 logging_config = config.get("*", "core", "log") or default_logging; | 157 logging_config = config.get("*", "log") or default_logging; |
| 158 | 158 |
| 159 | 159 |
| 160 for name, sink_maker in pairs(old_sink_types) do | 160 for name, sink_maker in pairs(old_sink_types) do |
| 161 log_sink_types[name] = sink_maker; | 161 log_sink_types[name] = sink_maker; |
| 162 end | 162 end |
