From 16afbddeada7161e931dc261d3404bb5bbc1743d Mon Sep 17 00:00:00 2001 From: omniscient <17525998+omnisci3nce@users.noreply.github.com> Date: Thu, 17 Oct 2024 15:54:22 +1100 Subject: add .m on mac. log INFO and module name --- src/log.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/log.c') diff --git a/src/log.c b/src/log.c index 2a75201..5a6ca5c 100644 --- a/src/log.c +++ b/src/log.c @@ -1,7 +1,11 @@ #include +static const char* log_level_strings[] = { + "FATAL", "ERROR", "WARN", "INFO", "DEBUG", "TRACE" +}; + void log_output(char* module, loglevel level, const char* message, ...) { char out_msg[4096]; - printf("Msg: %s\n", message); + printf("[%s] %s Msg: %s\n", module, log_level_strings[level], message); } -- cgit v1.2.3-70-g09d2