- for _, sink_config in pairs(logging_config) do
- if sink_config.to == sink_type then
+
+ for _, level in ipairs(logging_levels) do
+ if type(logging_config[level]) == "string" then
+ local value = logging_config[level];
+ if sink_type == "file" then
+ add_rule({
+ to = sink_type;
+ filename = value;
+ timestamps = true;
+ levels = { min = level };
+ });
+ elseif value == "*"..sink_type then
+ add_rule({
+ to = sink_type;
+ levels = { min = level };
+ });
+ end
+ end
+ end
+
+ for _, sink_config in ipairs(logging_config) do
+ if (type(sink_config) == "table" and sink_config.to == sink_type) then