mod_muc/muc.lib: Don't add messages without a body (such as chat state notifications...
[prosody.git] / core / loggingmanager.lua
index ce25b0e85126f584ff7756ac0c49d36e0fef3e11..c69dede85edf747d4c5f935f99fea5b06887d72a 100644 (file)
@@ -67,7 +67,7 @@ function apply_sink_rules(sink_type)
                for _, level in ipairs(logging_levels) do
                        if type(logging_config[level]) == "string" then
                                local value = logging_config[level];
-                               if sink_type == "file" then
+                               if sink_type == "file" and not value:match("^%*") then
                                        add_rule({
                                                to = sink_type;
                                                filename = value;
@@ -146,7 +146,7 @@ function reload_logging()
        
        logger.reset();
 
-       local debug_mode = config.get("*", "core", "debug");
+       local debug_mode = config.get("*", "debug");
 
        default_logging = { { to = "console" , levels = { min = (debug_mode and "debug") or "info" } } };
        default_file_logging = {
@@ -154,7 +154,7 @@ function reload_logging()
        };
        default_timestamp = "%b %d %H:%M:%S";
 
-       logging_config = config.get("*", "core", "log") or default_logging;
+       logging_config = config.get("*", "log") or default_logging;
        
        
        for name, sink_maker in pairs(old_sink_types) do