summaryrefslogtreecommitdiffstats
path: root/src/log.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/log.c')
-rw-r--r--src/log.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/log.c b/src/log.c
index 07e60ed..6b318b5 100644
--- a/src/log.c
+++ b/src/log.c
@@ -1,6 +1,7 @@
#include "log.h"
#include "util.h"
+#include <err.h>
#include <stdbool.h>
#include <stdlib.h>
@@ -18,7 +19,7 @@ log_init(void)
if (!envstr) return;
log_file = fopen(envstr, "w+");
- if (!log_file) PANIC("Failed to open log file\n");
+ if (!log_file) err(1, "fopen %s", envstr);
log_active = true;
}