From acdf59f55513c59677d5a78faaa532857517ee91 Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Sat, 8 Jun 2024 14:53:54 +0800 Subject: [PATCH] Emphasize prompt2 for remarkable log --- include/xy.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/include/xy.h b/include/xy.h index 4f10f80..c08f6cd 100644 --- a/include/xy.h +++ b/include/xy.h @@ -494,25 +494,29 @@ _xy_log_remarkably (int level, const char *prompt1, const char *prompt2, const c else if (level & XY_Log_Success) { /* [app 成功] [app success] */ - str = xy_strjoin (6, "[", prompt1, " ", xy_str_to_green (prompt2), "] ", xy_str_to_green (content)); + str = xy_strjoin (6, + "[", xy_str_to_green (prompt1), " ", xy_str_to_bold (xy_str_to_green (prompt2)), "] ", xy_str_to_green (content)); } else if (level & XY_Log_Info) { /* [app 信息] [app info] [app 提示] [app notice] */ - str = xy_strjoin (6, "[", prompt1, " ", xy_str_to_blue (prompt2), "] ", xy_str_to_blue (content)); + str = xy_strjoin (6, + "[", xy_str_to_blue (prompt1), " ", xy_str_to_bold (xy_str_to_blue (prompt2)), "] ", xy_str_to_blue (content)); } else if (level & XY_Log_Warn) { /* [app 警告] [app warn] */ - str = xy_strjoin (6, "[", prompt1, " ", xy_str_to_yellow (prompt2), "] ", xy_str_to_yellow (content)); + str = xy_strjoin (6, + "[", xy_str_to_yellow (prompt1), " ", xy_str_to_bold (xy_str_to_yellow (prompt2)), "] ", xy_str_to_yellow (content)); to_stderr = true; } else if (level & XY_Log_Error) { /* [app 错误] [app error] */ - str = xy_strjoin (6, "[", prompt1, " ", xy_str_to_red (prompt2), "] ", xy_str_to_red (content)); + str = xy_strjoin (6, + "[", xy_str_to_red (prompt1), " ", xy_str_to_bold (xy_str_to_red (prompt2)), "] ", xy_str_to_red (content)); to_stderr = true; } else