#include <syslog.h>
#include <stdint.h>
+#include <stdbool.h>
#include <stdio.h>
/* Here is some guidance on logging levels to use:
} zlog_dest_t;
#define ZLOG_NUM_DESTS (ZLOG_DEST_FILE+1)
+extern bool zlog_startup_stderr;
+
/* Message structure. */
struct message {
int key;
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
,
siginfo_t *siginfo, void *program_counter
#endif
-);
+ );
/* Log a backtrace. */
extern void zlog_backtrace(int priority);
int precision; /* configuration parameter */
int already_rendered; /* should be initialized to 0 */
char buf[QUAGGA_TIMESTAMP_LEN]; /* will contain the rendered timestamp
- */
+ */
};
/* Defines for use in command construction: */