This commit is contained in:
Kovid Goyal
2025-04-27 10:46:06 +05:30
parent 65d97e2379
commit 056e7532f6
2 changed files with 2 additions and 2 deletions

View File

@@ -51,7 +51,7 @@ get_argv_from(const char *filename, const char *argv0, argv_array *final_ans) {
if (errno == ENOENT || errno == ENOTDIR) return true;
#ifdef __APPLE__
int saved = errno;
os_log_error(OS_LOG_DEFAULT, "Failed to read from %s with error: %{darwin.errno}d", filename, errno);
os_log_error(OS_LOG_DEFAULT, "Failed to read from %{public}s with error: %{darwin.errno}d", filename, errno);
errno = saved;
#endif
fprintf(stderr, "Failed to read from %s ", filename); perror("with error");

View File

@@ -56,7 +56,7 @@ log_error(const char *fmt, ...) {
fprintf(stderr, "[%.3f] ", monotonic_t_to_s_double(monotonic()));
}
// To see os_log messages from kitty, use:
// log show --predicate 'processImagePath contains "kitty"'
// log show --predicate 'processImagePath contains "kitty" and messageType == error'
#ifdef __APPLE__
if (use_os_log) os_log_error(OS_LOG_DEFAULT, "%{public}s", sanbuf);
#endif