mirror of
https://github.com/RubyMetric/chsrc
synced 2025-06-08 19:54:13 +08:00
Use previous log style back
This commit is contained in:
parent
c7b65b39f2
commit
b3cbeb2a9a
@ -51,8 +51,8 @@
|
|||||||
void
|
void
|
||||||
chsrc_note2 (const char* str)
|
chsrc_note2 (const char* str)
|
||||||
{
|
{
|
||||||
char *prompt = xy_2strjoin (App_Name " ", xy_str_to_bold (xy_str_to_yellow ("提示")));
|
char *prompt = xy_2strjoin (to_yellow (App_Name " "), to_boldyellow ("提示"));
|
||||||
xy_log_brkt_to (prompt, xy_str_to_yellow (str), stdout);
|
xy_log_brkt_to (prompt, to_yellow (str), stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -77,14 +77,14 @@ chsrc_log_cmd_result (bool result, int ret_code)
|
|||||||
{
|
{
|
||||||
if (result)
|
if (result)
|
||||||
{
|
{
|
||||||
xy_log_brkt (App_Name, to_boldgreen ("运行"), to_green ("√ 命令执行成功"));
|
xy_log_brkt (to_green (App_Name), to_boldgreen ("运行"), to_green ("√ 命令执行成功"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char buf[8] = {0};
|
char buf[8] = {0};
|
||||||
sprintf (buf, "%d", ret_code);
|
sprintf (buf, "%d", ret_code);
|
||||||
char *log = xy_2strjoin (to_red ("x 命令执行失败,返回码 "), to_boldred (buf));
|
char *log = xy_2strjoin (to_red ("x 命令执行失败,返回码 "), to_boldred (buf));
|
||||||
xy_log_brkt (App_Name, to_boldred ("运行"), log);
|
xy_log_brkt (to_red (App_Name), to_boldred ("运行"), log);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -622,7 +622,7 @@ not_root:
|
|||||||
static void
|
static void
|
||||||
chsrc_run (const char *cmd, int run_option)
|
chsrc_run (const char *cmd, int run_option)
|
||||||
{
|
{
|
||||||
xy_log_brkt (App_Name, to_boldblue ("运行"), to_blue (cmd));
|
xy_log_brkt (to_blue (App_Name), to_boldblue ("运行"), to_blue (cmd));
|
||||||
int status = system (cmd);
|
int status = system (cmd);
|
||||||
if (0==status)
|
if (0==status)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user