summaryrefslogtreecommitdiffstats
path: root/src/lisiblestd/log.c
diff options
context:
space:
mode:
authorClement Sibille <clements+git@lisible.xyz>2024-05-20 00:44:59 +0900
committerClement Sibille <clements+git@lisible.xyz>2024-05-20 01:28:21 +0900
commit817c1fd14c9b9b3fc93922f7ea06d9edfd53c63b (patch)
tree047b07b108a08c7dd0bd2f40bafa79bfb49dd9c4 /src/lisiblestd/log.c
parent399be44fbc3767e7c1ff505119f9e07ee25b1078 (diff)
Add log levels to log macros
Diffstat (limited to 'src/lisiblestd/log.c')
-rw-r--r--src/lisiblestd/log.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/lisiblestd/log.c b/src/lisiblestd/log.c
new file mode 100644
index 0000000..a28d202
--- /dev/null
+++ b/src/lisiblestd/log.c
@@ -0,0 +1,18 @@
+#include "log.h"
+
+const char *log_level_to_str(LogLevel log_level) {
+ switch (log_level) {
+ case LogLevel_Trace:
+ return "TRACE";
+ case LogLevel_Debug:
+ return "DEBUG";
+ case LogLevel_Warn:
+ return "WARN";
+ case LogLevel_Error:
+ return "ERROR";
+ case LogLevel_Info:
+ default:
+ return "INFO";
+ break;
+ }
+}
Go back to lisible.xyz