From: Anthony Minessale Date: Wed, 25 Mar 2015 03:29:24 +0000 (-0500) Subject: add support for file:func to custom log mappings X-Git-Tag: v1.4.19~6^2~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd10f0893428368635eee289034a5ab321df99db;p=thirdparty%2Ffreeswitch.git add support for file:func to custom log mappings --- diff --git a/src/mod/loggers/mod_logfile/mod_logfile.c b/src/mod/loggers/mod_logfile/mod_logfile.c index 15d972ba7c..0eba7466c4 100644 --- a/src/mod/loggers/mod_logfile/mod_logfile.c +++ b/src/mod/loggers/mod_logfile/mod_logfile.c @@ -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];