]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add support for file:func to custom log mappings
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 25 Mar 2015 03:29:24 +0000 (22:29 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 25 Mar 2015 03:29:24 +0000 (22:29 -0500)
src/mod/loggers/mod_logfile/mod_logfile.c

index 15d972ba7cef46731ec975a4d922cdf205ee3c1c..0eba7466c4d8848aa7d0428d84af691986dbfdd4 100644 (file)
@@ -283,6 +283,13 @@ static switch_status_t process_node(const switch_log_node_t *node, switch_log_le
                        ok = switch_log_check_mask(mask, level);
                }
 
+               if (!ok) {
+                       char tmp[256] = "";
+                       switch_snprintf(tmp, sizeof(tmp), "%s:%s", node->file, node->func);
+                       mask = (size_t) switch_core_hash_find(profile->log_hash, tmp);
+                       ok = switch_log_check_mask(mask, level);
+               }
+
                if (ok) {
                        if (profile->log_uuid && !zstr(node->userdata)) {
                                char buf[2048];