diff options
author | Dmitrij Tejblum <tejblum@yandex-team.ru> | 2011-09-21 17:41:41 +0400 |
---|---|---|
committer | Denis Ovsienko <infrastation@yandex.ru> | 2011-09-25 18:17:39 +0400 |
commit | 614da2bf57d7df965d41869d1aa8321210d6560e (patch) | |
tree | c0d70c117af2681a7c56baaeb2001d20aeda5982 /lib/log.h | |
parent | ca22cc4cc397dac8f3bf57eca516360085d44214 (diff) |
lib: provide more information in case of failed LOOKUP.
* log.[ch]
* mes_lookup: add a parameter with the name of the message list, print
the name in case of failure.
* LOOKUP macro: pass the name of the message list.
Diffstat (limited to 'lib/log.h')
-rw-r--r-- | lib/log.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -146,12 +146,12 @@ extern int zlog_reset_file (struct zlog *zl); extern int zlog_rotate (struct zlog *); /* For hackey massage lookup and check */ -#define LOOKUP(x, y) mes_lookup(x, x ## _max, y, "(no item found)") +#define LOOKUP(x, y) mes_lookup(x, x ## _max, y, "(no item found)", #x) extern const char *lookup (const struct message *, int); extern const char *mes_lookup (const struct message *meslist, int max, int index, - const char *no_item); + const char *no_item, const char *mesname); extern const char *zlog_priority[]; extern const char *zlog_proto_names[]; |