summaryrefslogtreecommitdiff
path: root/src/log.c
diff options
context:
space:
mode:
authoromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-10-19 13:24:31 +1100
committeromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-10-19 13:24:31 +1100
commit6182860f1b1aba4128b4f66eda7977600e60d1a0 (patch)
tree388d9aff8ca19ef324633ac1bea43f1548675150 /src/log.c
parent5d1750d9adfc45b53c75310c58e31dfdbd8a6e15 (diff)
parentd6d742f8a24490f885e4a1ae3fea7ec46b01f58c (diff)
fix merge
Diffstat (limited to 'src/log.c')
-rw-r--r--src/log.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/log.c b/src/log.c
index f0dfd87..66ffe2d 100644
--- a/src/log.c
+++ b/src/log.c
@@ -1,7 +1,9 @@
#include <celeritas.h>
-void log_output(char* module, LogLevel level, const char* message, ...) {
+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 - %s\n", module, log_level_strings[level], message);
}