diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2019-04-15 19:03:57 -0300 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2019-04-18 13:17:54 -0300 |
| commit | c650e48c54c2f524a473781f019b059daf2fd8d0 (patch) | |
| tree | c6b660c7d0432eae76ec2c7fa89d602331c7f340 /lib/log.h | |
| parent | e412d3b8d974dd39d95ce484b021a6593d373151 (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.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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); |
