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.
diff --git a/lib/log.h b/lib/log.h
index 1f9a689..ee34a4a 100644
--- a/lib/log.h
+++ b/lib/log.h
@@ -146,12 +146,12 @@
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[];