summaryrefslogtreecommitdiff
path: root/lib/log.h
diff options
context:
space:
mode:
authorDmitrij Tejblum <tejblum@yandex-team.ru>2011-09-21 17:41:41 +0400
committerDenis Ovsienko <infrastation@yandex.ru>2011-09-27 21:45:53 +0400
commit51abba509a0997f05427a8acbe74dd07d8d6026e (patch)
treec9f19fc4eaf2aa01d96bde18b9ec09f1b92724e4 /lib/log.h
parenteda3529e9cf163ccbcf47c889b16fd707d2aed76 (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.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/log.h b/lib/log.h
index 1f9a6899..ee34a4ad 100644
--- a/lib/log.h
+++ b/lib/log.h
@@ -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[];