Software /
code /
prosody
Comparison
core/loggingmanager.lua @ 3540:bc139431830b
Monster whitespace commit (beware the whitespace monster).
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sat, 16 Oct 2010 23:00:42 +0500 |
parent | 3514:fdae08713c67 |
child | 3750:e076e4bf70bf |
comparison
equal
deleted
inserted
replaced
3539:8bbd965267b2 | 3540:bc139431830b |
---|---|
8 | 8 |
9 | 9 |
10 local format, rep = string.format, string.rep; | 10 local format, rep = string.format, string.rep; |
11 local pcall = pcall; | 11 local pcall = pcall; |
12 local debug = debug; | 12 local debug = debug; |
13 local tostring, setmetatable, rawset, pairs, ipairs, type = | 13 local tostring, setmetatable, rawset, pairs, ipairs, type = |
14 tostring, setmetatable, rawset, pairs, ipairs, type; | 14 tostring, setmetatable, rawset, pairs, ipairs, type; |
15 local io_open, io_write = io.open, io.write; | 15 local io_open, io_write = io.open, io.write; |
16 local math_max, rep = math.max, string.rep; | 16 local math_max, rep = math.max, string.rep; |
17 local os_date, os_getenv = os.date, os.getenv; | 17 local os_date, os_getenv = os.date, os.getenv; |
18 local getstyle, getstring = require "util.termcolours".getstyle, require "util.termcolours".getstring; | 18 local getstyle, getstring = require "util.termcolours".getstyle, require "util.termcolours".getstring; |
166 | 166 |
167 logger.reset(); | 167 logger.reset(); |
168 | 168 |
169 default_logging = { { to = "console" , levels = { min = (debug_mode and "debug") or "info" } } }; | 169 default_logging = { { to = "console" , levels = { min = (debug_mode and "debug") or "info" } } }; |
170 default_file_logging = { | 170 default_file_logging = { |
171 { to = "file", levels = { min = (debug_mode and "debug") or "info" }, timestamps = true } | 171 { to = "file", levels = { min = (debug_mode and "debug") or "info" }, timestamps = true } |
172 }; | 172 }; |
173 default_timestamp = "%b %d %H:%M:%S"; | 173 default_timestamp = "%b %d %H:%M:%S"; |
174 | 174 |
175 logging_config = config.get("*", "core", "log") or default_logging; | 175 logging_config = config.get("*", "core", "log") or default_logging; |
176 | 176 |