summaryrefslogtreecommitdiff
path: root/lib/log.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/log.h')
-rw-r--r--lib/log.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/log.h b/lib/log.h
index 8fb98a02ab..189857a907 100644
--- a/lib/log.h
+++ b/lib/log.h
@@ -29,6 +29,10 @@
#include <stdarg.h>
#include "lib/hook.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Hook for external logging function */
DECLARE_HOOK(zebra_ext_log, (int priority, const char *format, va_list args),
(priority, format, args));
@@ -93,11 +97,11 @@ 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__)
+ 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__)
+ zlog_warn("[EC %" PRIu32 "] " format, ferr_id, ##__VA_ARGS__)
extern void zlog_thread_info(int log_level);
@@ -196,4 +200,8 @@ struct timestamp_control {
"Local use\n" \
"Local use\n"
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _ZEBRA_LOG_H */