]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/log.h
zebra, lib: fix the ZEBRA_INTERFACE_VRF_UPDATE zapi message
[mirror_frr.git] / lib / log.h
index 07eb6d5bd5605420387820306630b3ae369d8ee7..be1d9fb5922896b083a2009a4f2fb577a833b5b3 100644 (file)
--- a/lib/log.h
+++ b/lib/log.h
@@ -85,6 +85,15 @@ extern void zlog_info(const char *format, ...) PRINTF_ATTRIBUTE(1, 2);
 extern void zlog_notice(const char *format, ...) PRINTF_ATTRIBUTE(1, 2);
 extern void zlog_debug(const char *format, ...) PRINTF_ATTRIBUTE(1, 2);
 
+/* For logs which have error codes associated with them */
+#define flog_err(ferr_id, format, ...)                                        \
+       zlog_err("[EC %"PRIu32"] " format, ferr_id, ##__VA_ARGS__)
+#define flog_err_sys(ferr_id, format, ...)                                     \
+       flog_err(ferr_id, format, ##__VA_ARGS__)
+#define flog_warn(ferr_id, format, ...)                                        \
+       zlog_warn("[EC %"PRIu32"] " format, ferr_id, ##__VA_ARGS__)
+
+
 extern void zlog_thread_info(int log_level);
 
 /* Set logging level for the given destination.  If the log_level