diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-02-10 11:16:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-10 11:16:01 +0100 |
commit | 0ead0eeabb360df8b3a333cb58410bd52e2f33c1 (patch) | |
tree | 0006d725dd2948cc6353d3a5f3373f3ac24534c3 /drivers/unix | |
parent | ed51c55625cc8d3c598a32d2d178be3464951d21 (diff) | |
parent | 580b8cc012ee24d01ad22085454f34831fa706d2 (diff) |
Merge pull request #35301 from Calinou/improve-console-error-logging
Improve the console error logging appearance
Diffstat (limited to 'drivers/unix')
-rw-r--r-- | drivers/unix/os_unix.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index c5eb343cc8..2d8d37b2f1 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -559,34 +559,34 @@ void UnixTerminalLogger::log_error(const char *p_function, const char *p_file, i // This prevents Godot from writing ANSI escape codes when redirecting // stdout and stderr to a file. const bool tty = isatty(fileno(stdout)); - const char *red = tty ? "\E[0;31m" : ""; + const char *gray = tty ? "\E[0;90m" : ""; + const char *red = tty ? "\E[0;91m" : ""; const char *red_bold = tty ? "\E[1;31m" : ""; - const char *yellow = tty ? "\E[0;33m" : ""; + const char *yellow = tty ? "\E[0;93m" : ""; const char *yellow_bold = tty ? "\E[1;33m" : ""; - const char *magenta = tty ? "\E[0;35m" : ""; + const char *magenta = tty ? "\E[0;95m" : ""; const char *magenta_bold = tty ? "\E[1;35m" : ""; - const char *cyan = tty ? "\E[0;36m" : ""; + const char *cyan = tty ? "\E[0;96m" : ""; const char *cyan_bold = tty ? "\E[1;36m" : ""; const char *reset = tty ? "\E[0m" : ""; - const char *bold = tty ? "\E[1m" : ""; switch (p_type) { case ERR_WARNING: - logf_error("%sWARNING: %s: %s%s%s\n", yellow_bold, p_function, reset, bold, err_details); - logf_error("%s At: %s:%i.%s\n", yellow, p_file, p_line, reset); + logf_error("%sWARNING:%s %s\n", yellow_bold, yellow, err_details); + logf_error("%s at: %s (%s:%i)%s\n", gray, p_function, p_file, p_line, reset); break; case ERR_SCRIPT: - logf_error("%sSCRIPT ERROR: %s: %s%s%s\n", magenta_bold, p_function, reset, bold, err_details); - logf_error("%s At: %s:%i.%s\n", magenta, p_file, p_line, reset); + logf_error("%sSCRIPT ERROR:%s %s\n", magenta_bold, magenta, err_details); + logf_error("%s at: %s (%s:%i)%s\n", gray, p_function, p_file, p_line, reset); break; case ERR_SHADER: - logf_error("%sSHADER ERROR: %s: %s%s%s\n", cyan_bold, p_function, reset, bold, err_details); - logf_error("%s At: %s:%i.%s\n", cyan, p_file, p_line, reset); + logf_error("%sSHADER ERROR:%s %s\n", cyan_bold, cyan, err_details); + logf_error("%s at: %s (%s:%i)%s\n", gray, p_function, p_file, p_line, reset); break; case ERR_ERROR: default: - logf_error("%sERROR: %s: %s%s%s\n", red_bold, p_function, reset, bold, err_details); - logf_error("%s At: %s:%i.%s\n", red, p_file, p_line, reset); + logf_error("%sERROR:%s %s\n", red_bold, red, err_details); + logf_error("%s at: %s (%s:%i)%s\n", gray, p_function, p_file, p_line, reset); break; } } |