about summary refs log tree commit diff stats
path: root/src/core.c
diff options
context:
space:
mode:
authorYang Liu <liuyang22@iscas.ac.cn>2025-02-20 22:25:14 +0800
committerGitHub <noreply@github.com>2025-02-20 15:25:14 +0100
commitbb8559933f4e2745b6114e270548301ad081878a (patch)
treed064e60293fc6bc303b9d49e7b01298c2af1cb79 /src/core.c
parentc2cb333261e31caedc2cf3ca2a13405c660c30b1 (diff)
downloadbox64-bb8559933f4e2745b6114e270548301ad081878a.tar.gz
box64-bb8559933f4e2745b6114e270548301ad081878a.zip
Made error logs prefix has red color (#2396)
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core.c b/src/core.c
index 10d0b11e..51952c7d 100644
--- a/src/core.c
+++ b/src/core.c
@@ -201,7 +201,12 @@ void printf_ftrace(int prefix, const char* fmt, ...)
     va_list args;
     va_start(args, fmt);
     if (prefix && ftrace == stdout) {
-        fprintf(ftrace, box64_is32bits ? "[BOX32] " : "[BOX64] ");
+        if (prefix > 1) {
+            fprintf(ftrace, "[\033[31m%s\033[0m] ",
+                box64_is32bits ? "BOX32" : "BOX64");
+        } else {
+            fprintf(ftrace, box64_is32bits ? "[BOX32] " : "[BOX64] ");
+        }
     }
     vfprintf(ftrace, fmt, args);