mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-14 12:34:44 +02:00
Use os_log to report get_argv failures on Apple
This commit is contained in:
@@ -55,8 +55,10 @@ log_error(const char *fmt, ...) {
|
||||
if (!use_os_log) { // Apple's os_log already records timestamps
|
||||
fprintf(stderr, "[%.3f] ", monotonic_t_to_s_double(monotonic()));
|
||||
}
|
||||
// To see os_log messages from kitty, use:
|
||||
// log show --predicate 'processImagePath contains "kitty"'
|
||||
#ifdef __APPLE__
|
||||
if (use_os_log) os_log(OS_LOG_DEFAULT, "%{public}s", sanbuf);
|
||||
if (use_os_log) os_log_error(OS_LOG_DEFAULT, "%{public}s", sanbuf);
|
||||
#endif
|
||||
if (!use_os_log) fprintf(stderr, "%s\n", sanbuf);
|
||||
#undef bufprint
|
||||
|
||||
Reference in New Issue
Block a user