It is an error for an application to send a message with empty tag. To
make it easy to catch such situation and fix it in the app, empty-tagged
messages are exluded from limiter and marked with DLOG_ERROR_NOTAG tag.
Change-Id: I5ca0e0ef0e20f9d7cabcec11dad379023b7f0630
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
if (!rules_hashmap)
return 1;
+ /* allow empty-tagged messages and make it easy to catch an application that does that */
+ if (!strlen(tag))
+ return 1;
+
const char prio_c = util_prio_to_char(prio);
struct rule *r =
hashmap_search(rules_hashmap, tag, prio_c) ?:
priChar = filter_pri_to_char((log_priority)entry->priority);
tag = log_buffer_get_tag(entry);
+ /* mark empty-tagged messages and make it easy to catch an application that does that */
+ if (!tag || !strlen(tag))
+ tag = "DLOG_ERROR_NOTAG";
+
msg = log_buffer_get_message(entry);
/*