aboutsummaryrefslogtreecommitdiff
path: root/log.c
diff options
context:
space:
mode:
authorCraig Barnes <craigbarnes@protonmail.com>2021-01-15 20:39:45 +0000
committerCraig Barnes <craigbarnes@protonmail.com>2021-01-16 19:56:33 +0000
commit22f25a9e4feddbc093ae01cd53bdda3c2c3a82e9 (patch)
tree4d0c9bce90d0f0d04c22e9f88b52f910695cfaf6 /log.c
parentMerge branch 'decset-1047-and-1048' (diff)
Print stack trace on assert() failure or when calling fatal_error()
Note: this uses the __sanitizer_print_stack_trace() function from the AddressSanitizer runtime, so it only works when AddressSanitizer is in use.
Diffstat (limited to 'log.c')
-rw-r--r--log.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/log.c b/log.c
index d47e22ac..2dafd49b 100644
--- a/log.c
+++ b/log.c
@@ -1,15 +1,15 @@
#include "log.h"
-#include <stdlib.h>
-#include <stdio.h>
+#include <errno.h>
#include <stdarg.h>
-#include <string.h>
#include <stdbool.h>
-#include <errno.h>
-#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <syslog.h>
#include <unistd.h>
-#include <syslog.h>
+#include "debug.h"
static bool colorize = false;
static bool do_syslog = true;