summaryrefslogtreecommitdiff
path: root/src/log.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/log.c')
-rw-r--r--src/log.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/log.c b/src/log.c
index 03b81e9..670fbb5 100644
--- a/src/log.c
+++ b/src/log.c
@@ -56,7 +56,7 @@ static inline void write_to_file(LogLevelE lvl, const char *src_file, u64 src_li
char time_str[64];
time_str[strftime(time_str, sizeof(time_str), "%Y-%m-%d %H:%M:%S", time)] = '\0';
- fprintf(L.log_file, "%s %-5s%s:%lu ", time_str, level_strings[lvl], src_file, src_line);
+ fprintf(L.log_file, "%s [%-5s] %s:%lu ", time_str, level_strings[lvl], src_file, src_line);
vfprintf(L.log_file, fmt, va);
fprintf(L.log_file, "\n");
}
@@ -81,7 +81,7 @@ void log_log(LogLevelE lvl, const char *src_file, u64 src_line, const char *fmt,
time_str[strftime(time_str, sizeof(time_str), "%H:%M:%S", time)] = '\0';
#ifndef LOG_NO_COLOR
- fprintf(L.log_default, "%s %s%-5s\x1b[0m\x1b[90m%s:%lu:\x1b[0m ",
+ fprintf(L.log_default, "%s %s[%-5s] \x1b[0m\x1b[90m%s:%lu:\x1b[0m ",
time_str, level_colors[lvl], level_strings[lvl], src_file, src_line);
#else
fprintf(L.log_default, "%s %-5s %s:%lu: ",