summaryrefslogtreecommitdiff
path: root/lib/log.h
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2019-04-15 19:03:57 -0300
committerRenato Westphal <renato@opensourcerouting.org>2019-04-18 13:17:54 -0300
commitc650e48c54c2f524a473781f019b059daf2fd8d0 (patch)
treec6b660c7d0432eae76ec2c7fa89d602331c7f340 /lib/log.h
parente412d3b8d974dd39d95ce484b021a6593d373151 (diff)
lib: introduce flog() to simplify the northbound code a little bit
flog() is a small wrapper around zlog() that can be useful in a few places to reduce code duplication. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'lib/log.h')
-rw-r--r--lib/log.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/log.h b/lib/log.h
index 09d3a65ecd..9368bf9e82 100644
--- a/lib/log.h
+++ b/lib/log.h
@@ -103,7 +103,8 @@ extern void zlog(int priority, const char *format, ...) PRINTF_ATTRIBUTE(2, 3);
flog_err(ferr_id, format, ##__VA_ARGS__)
#define flog_warn(ferr_id, format, ...) \
zlog_warn("[EC %" PRIu32 "] " format, ferr_id, ##__VA_ARGS__)
-
+#define flog(priority, ferr_id, format, ...) \
+ zlog(priority, "[EC %" PRIu32 "] " format, ferr_id, ##__VA_ARGS__)
extern void zlog_thread_info(int log_level);