summaryrefslogtreecommitdiff
path: root/inc/cad/log.h
diff options
context:
space:
mode:
Diffstat (limited to 'inc/cad/log.h')
-rw-r--r--inc/cad/log.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/inc/cad/log.h b/inc/cad/log.h
new file mode 100644
index 0000000..dd46479
--- /dev/null
+++ b/inc/cad/log.h
@@ -0,0 +1,8 @@
+#pragma once
+
+#define LOG(fmt, ...) \
+ fprintf(stderr, "%s:%d: " fmt, __FILE__, __LINE__, ##__VA_ARGS__);
+
+#define CRASH(fmt, ...) \
+ fprintf(stderr, "%s:%d: " fmt, __FILE__, __LINE__, ##__VA_ARGS__); \
+ abort();