aboutsummaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/util.c b/src/util.c
index 15ac0d4..ba99bda 100644
--- a/src/util.c
+++ b/src/util.c
@@ -3,7 +3,7 @@
void die(const char* fmt, ...) {
va_list ap;
- fprintf(stderr, "[\e[31m==\e[0m] ERROR ");
+ fprintf(stderr, "[\e[31;1m==\e[0m] FATAL ERROR ");
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
@@ -13,6 +13,18 @@ void die(const char* fmt, ...) {
exit(1);
}
+void log_err(const char* fmt, ...) {
+ va_list ap;
+
+ fprintf(stderr, "[\e[31m==\e[0m] ERROR ");
+
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+
+ fprintf(stderr, "\n");
+}
+
void log_inf(const char* fmt, ...) {
va_list ap;
@@ -35,7 +47,7 @@ void log_raw(const char* fmt, ...) {
void log_war(const char* fmt, ...) {
va_list ap;
- fprintf(stderr, "[\e[33m==\e[0m] WARNING");
+ fprintf(stderr, "[\e[33m==\e[0m] WARNING ");
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);