Software /
code /
prosody
Comparison
core/loggingmanager.lua @ 4140:e463e1df1bda
loggingmanager: Iterate over logging config rules using ipairs rather than pairs
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 13 Feb 2011 18:35:39 +0000 |
parent | 4124:3761aa844d65 |
child | 4141:ef94984c44a0 |
comparison
equal
deleted
inserted
replaced
4139:eef75a0c85e3 | 4140:e463e1df1bda |
---|---|
99 }); | 99 }); |
100 end | 100 end |
101 end | 101 end |
102 end | 102 end |
103 | 103 |
104 for _, sink_config in pairs(logging_config) do | 104 for _, sink_config in ipairs(logging_config) do |
105 if (type(sink_config) == "table" and sink_config.to == sink_type) then | 105 if (type(sink_config) == "table" and sink_config.to == sink_type) then |
106 add_rule(sink_config); | 106 add_rule(sink_config); |
107 elseif (type(sink_config) == "string" and sink_config:match("^%*(.+)") == sink_type) then | 107 elseif (type(sink_config) == "string" and sink_config:match("^%*(.+)") == sink_type) then |
108 add_rule({ levels = { min = "debug" }, to = sink_type }); | 108 add_rule({ levels = { min = "debug" }, to = sink_type }); |
109 end | 109 end |