Repository navigation
Conversation
`__private_api_log_lit` sent messages to `NSLog` only for `target_os = "ios"`. tvOS fell through to the desktop path, which prints with `eprintln!`, and an app on an Apple TV has no terminal: its standard error only shows with Xcode's debugger attached. So `warn!`, `error!` and the other `log-impl` macros never reached the system log, where Console and `log stream` read it. tvOS now takes the iOS path, like the rest of the iOS code it already shares. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
__private_api_log_litsends messages toNSLogonly under#[cfg(target_os = "ios")]. tvOS falls through to the desktop version, which prints witheprintln!. An app on an Apple TV has no terminal, so its standard error only shows with Xcode's debugger attached:warn!,error!and the otherlog-implmacros never reach the system log that Console andlog streamread.The rest of the iOS code that tvOS shares since #651 is already gated on
any(target_os = "ios", target_os = "tvos"), andnative::ios::logbuilds for tvOS.Change
The desktop
__private_api_log_litleaves tvOS out, and the iOS one takes it.Verification
warn!at launch when its save doesn't parse. Before this change,xcrun simctl spawn <device> log stream --predicate 'process == "chomp-tv"'showed nothing from it. With it, the warning shows there.cargo check --features log-implpasses foraarch64-apple-tvos,aarch64-apple-tvos-sim,aarch64-apple-iosandaarch64-apple-darwin.Related
NSLogas an argument rather than as the format, so a%in it can't crash the app. With this change, tvOS goes through the samenative::ios::log, so it needs ios: pass log messages to NSLog as an argument, not as the format #684 too.__private_api_log_lit, so whichever of the two merges second needs a one-line rebase.🤖 Generated with Claude Code