summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/logging.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/src/logging.c b/src/logging.c
deleted file mode 100644
index e755710..0000000
--- a/src/logging.c
+++ /dev/null
@@ -1,40 +0,0 @@
-#include <rune_logging.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-
-#define LSTR_FATAL "[FATAL]"
-#define LSTR_ERROR "[ERROR]"
-#define LSTR_WARN "[WARNING]"
-#define LSTR_INFO "[INFO]"
-#define LSTR_DEBUG "[DEBUG]"
-
-void log_output(int level, const char *fmt, ...) {
- char out[8192];
- memset(out, 0, sizeof(out));
-
- va_list arg_ptr;
- va_start(arg_ptr, fmt);
- vsnprintf(out, 8192, fmt, arg_ptr);
- va_end(arg_ptr);
-
- char *lvl_str;
- switch (level) {
- case LOG_FATAL:
- lvl_str = LSTR_FATAL;
- break;
- case LOG_ERROR:
- lvl_str = LSTR_ERROR;
- break;
- case LOG_WARN:
- lvl_str = LSTR_WARN;
- break;
- case LOG_INFO:
- lvl_str = LSTR_INFO;
- break;
- case LOG_DEBUG:
- lvl_str = LSTR_DEBUG;
- break;
- }
- printf("%s %s\n", lvl_str, out);
-}