summaryrefslogtreecommitdiff
path: root/src/log.c
diff options
context:
space:
mode:
authoromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-10-17 15:54:22 +1100
committeromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-10-17 15:54:22 +1100
commit16afbddeada7161e931dc261d3404bb5bbc1743d (patch)
treee75db4d668c6a9ebfd07e4dd4d1fdabb66a95896 /src/log.c
parentff96a533014174d0857872f86f1536a06089f3d2 (diff)
add .m on mac. log INFO and module name
Diffstat (limited to 'src/log.c')
-rw-r--r--src/log.c6
1 files changed, 5 insertions, 1 deletions
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 <celeritas.h>
+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);
}