GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||
GeezerVison is showing github.com — feat(ios): structured app logs that follow relaunches by rigor789 · Pull Request #6179 · NativeScript/nativescript-cli Conversation
|
| Setup | Simulator (iOS 26.2) | iPad (iPadOS 26.7) |
|---|---|---|
| Default | 11/11 | 11/11 |
--log debug and --log trace, before stacking |
11/11 | 11/11 |
| This CLI with stock runtime 9.1.0, before stacking | no headers, long messages still truncated as today | not run |
--log trace is large: about 11,000–13,000 extra lines per run of the demo app.logFormat: all unit tests pass, including new ones for lost pieces, interleaved messages and whitespace. On a simulator, captured log stream output from the main thread, two workers and stdout logging at once was rebuilt exactly by this code; see feat(console): split long messages for os_log and report errors as errors ios#530 for the numbers. Not rerun on the iPad.Base: #6178. Needs NativeScript/ios-device-lib#88 released, and NativeScript/ios#530 for stitching.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews: auto_review: drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
2fbe7d3 to
eb97eb3
Compare
eb97eb3 to
32d6c68
Compare
32d6c68 to
bfef406
Compare
bfef406 to
8783785
Compare
5461769 to
e9a3bd7
Compare
Devices stream com.apple.os_trace_relay and simulators use log stream, both selected by executable name, so logs survive closing and reopening the app. --log picks the scope: JS output by default, the app's native logs without debug entries with debug, everything with trace or all. Without a new enough ios-device-lib, devices fall back to the syslog relay. Debug builds ask the runtime for chunk markers through logChunkMarkers in the app's package.json, and the CLI stitches split messages back together per process and thread.
Asks the runtime for log format 1 through the logFormat key of the app's package.json, in place of logChunkMarkers. In format 1, each piece of a message the runtime had to split is logged as "[ns <id> <index>/<count>] <piece>", where the pieces are consecutive slices of the message. The stitcher now collects pieces by process and message id, prints the message as soon as its last piece arrives, and after 500 ms prints what it has with "<…lost…>" where pieces never arrived. A message can no longer be joined onto another one whose last piece os_log dropped. Pieces are joined before the entry is turned into text, so the repeated console prefix no longer has to be stripped. The syslog fallback, which doesn't reassemble, removes the headers and shows the pieces as lines.
e9a3bd7 to
071afe8
Compare
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.