aboutgitcodebugslistschat
path: root/log.h
diff options
context:
space:
mode:
Diffstat (limited to 'log.h')
-rw-r--r--log.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/log.h b/log.h
index d4e9d85..d4ea141 100644
--- a/log.h
+++ b/log.h
@@ -10,12 +10,17 @@
#define LOGFILE_CUT_RATIO 30 /* When full, cut ~30% size */
#define LOGFILE_SIZE_MIN (5UL * MAX(BUFSIZ, PAGE_SIZE))
-void die(const char *format, ...);
void err(const char *format, ...);
void warn(const char *format, ...);
void info(const char *format, ...);
void debug(const char *format, ...);
+#define die(...) \
+ do { \
+ err(__VA_ARGS__); \
+ exit(EXIT_FAILURE); \
+ } while (0)
+
extern int log_trace;
void trace_init(int enable);
#define trace(...) \