summaryrefslogtreecommitdiff
path: root/src/logging/logging.c
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2021-09-23 23:11:23 -0500
committersanine <sanine.not@pm.me>2021-09-23 23:11:23 -0500
commit1ca109e1770b56095bdf4c664f3b99b7ac93776d (patch)
tree15d6d7812a9c921c87eede2c451a96af6b13cdf2 /src/logging/logging.c
parent6f92e9da2f6b0223c34728da34be65d76d5db485 (diff)
add honey_log_level_str_()
Diffstat (limited to 'src/logging/logging.c')
-rw-r--r--src/logging/logging.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/logging/logging.c b/src/logging/logging.c
new file mode 100644
index 0000000..429f222
--- /dev/null
+++ b/src/logging/logging.c
@@ -0,0 +1,33 @@
+#include <stdio.h>
+
+#include "logging/logging.h"
+
+
+const char * honey_log_level_str_(struct honey_log_info *info)
+{
+ switch(info->log_level) {
+ case DEBUG:
+ return "DEBUG";
+ break;
+
+ case INFO:
+ return "INFO";
+ break;
+
+ case WARN:
+ return "WARN";
+ break;
+
+ case ERROR:
+ return "ERROR";
+ break;
+
+ case FATAL:
+ return "FATAL";
+ break;
+
+ default:
+ return NULL;
+ break;
+ }
+}