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 /platform/osx | |
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 'platform/osx')
-rw-r--r-- | platform/osx/os_osx.mm | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index bc77ac3cfd..314f369dc6 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -1724,42 +1724,39 @@ public: case ERR_WARNING: if (NSAppKitVersionNumber >= NSAppKitVersionNumber10_12) { os_log_info(OS_LOG_DEFAULT, - "WARNING: %{public}s: %{public}s\nAt: %{public}s:%i.", - p_function, err_details, p_file, p_line); + "WARNING: %{public}s\nat: %{public}s (%{public}s:%i)", + err_details, p_function, p_file, p_line); } - logf_error("\E[1;33mWARNING: %s: \E[0m\E[1m%s\n", p_function, - err_details); - logf_error("\E[0;33m At: %s:%i.\E[0m\n", p_file, p_line); + logf_error("\E[1;33mWARNING:\E[0;93m %s\n", err_details); + logf_error("\E[0;90m at: %s (%s:%i)\E[0m\n", p_function, p_file, p_line); break; case ERR_SCRIPT: if (NSAppKitVersionNumber >= NSAppKitVersionNumber10_12) { os_log_error(OS_LOG_DEFAULT, - "SCRIPT ERROR: %{public}s: %{public}s\nAt: %{public}s:%i.", - p_function, err_details, p_file, p_line); + "SCRIPT ERROR: %{public}s\nat: %{public}s (%{public}s:%i)", + err_details, p_function, p_file, p_line); } - logf_error("\E[1;35mSCRIPT ERROR: %s: \E[0m\E[1m%s\n", p_function, - err_details); - logf_error("\E[0;35m At: %s:%i.\E[0m\n", p_file, p_line); + logf_error("\E[1;35mSCRIPT ERROR:\E[0;95m %s\n", err_details); + logf_error("\E[0;90m at: %s (%s:%i)\E[0m\n", p_function, p_file, p_line); break; case ERR_SHADER: if (NSAppKitVersionNumber >= NSAppKitVersionNumber10_12) { os_log_error(OS_LOG_DEFAULT, - "SHADER ERROR: %{public}s: %{public}s\nAt: %{public}s:%i.", - p_function, err_details, p_file, p_line); + "SHADER ERROR: %{public}s\nat: %{public}s (%{public}s:%i)", + err_details, p_function, p_file, p_line); } - logf_error("\E[1;36mSHADER ERROR: %s: \E[0m\E[1m%s\n", p_function, - err_details); - logf_error("\E[0;36m At: %s:%i.\E[0m\n", p_file, p_line); + logf_error("\E[1;36mSHADER ERROR:\E[0;96m %s\n", err_details); + logf_error("\E[0;90m at: %s (%s:%i)\E[0m\n", p_function, p_file, p_line); break; case ERR_ERROR: default: if (NSAppKitVersionNumber >= NSAppKitVersionNumber10_12) { os_log_error(OS_LOG_DEFAULT, - "ERROR: %{public}s: %{public}s\nAt: %{public}s:%i.", - p_function, err_details, p_file, p_line); + "ERROR: %{public}s\nat: %{public}s (%{public}s:%i)", + err_details, p_function, p_file, p_line); } - logf_error("\E[1;31mERROR: %s: \E[0m\E[1m%s\n", p_function, err_details); - logf_error("\E[0;31m At: %s:%i.\E[0m\n", p_file, p_line); + logf_error("\E[1;31mERROR:\E[0;91m %s\n", err_details); + logf_error("\E[0;90m at: %s (%s:%i)\E[0m\n", p_function, p_file, p_line); break; } } |