summaryrefslogtreecommitdiff
path: root/lib/log.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/log.h')
-rw-r--r--lib/log.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/log.h b/lib/log.h
index 07eb6d5bd5..980f3ddf4b 100644
--- a/lib/log.h
+++ b/lib/log.h
@@ -85,6 +85,13 @@ 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 %d] " format, ferr_id, ##__VA_ARGS__)
+#define flog_err_sys(ferr_id, format, ...) \
+ flog_err(ferr_id, format, ##__VA_ARGS__)
+
+
extern void zlog_thread_info(int log_level);
/* Set logging level for the given destination. If the log_level