Repository navigation
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
eb97eb3 to
32d6c68
Compare
6694c2d to
a5cfdfc
Compare
32d6c68 to
bfef406
Compare
a5cfdfc to
bbb183e
Compare
bfef406 to
8783785
Compare
bbb183e to
3816e9c
Compare
3816e9c to
b1e11d7
Compare
5461769 to
e9a3bd7
Compare
b1e11d7 to
717c360
Compare
e9a3bd7 to
071afe8
Compare
NathanWalker
left a comment
There was a problem hiding this comment.
The change itself (717c3604a, about +58/-2) looks correct. The stdio check runs before the runtime-entry check, stitching happens before labelling so a split line gets one prefix, and release builds never get the key. All unit tests pass locally once it's built against ios-device-lib#88.
Blocking
- The branch needs restacking. The +2664/40-file diff and the conflict come from this branch still carrying the pre-merge commits of #6176/#6177, while its base
feat/ios-structured-logswas rebased onto the newmain. Applying717c3604aalone onto the current base gives no conflicts:(The base #6179 also needs a rebase onto #6178's latest commit.)git rebase --onto origin/feat/ios-structured-logs e9a3bd72e feat/ios-stdio-logs - CI fails only on the missing ios-device-lib typings, same as #6179, so that is gated on the #88 release and bump.
Should-fix
- Syslog fallback (
lib/services/ios-log-filter.ts:87-103): when the device falls back to syslog relay, forwarded stdout/stderr now shows at the default--loglevel, where it used to go to/dev/null. That breaks "default stays JS only". HaveIOSLogFilterdrop or relabel[org.nativescript.stdio:lines below debug level. - Test gap (
ios-simulator-log-provider.ts:146-147): nothing tests thesubsystem/categorymapping fromlog streamndjson, because the tests build entries by hand. If that mapping breaks, stdio entries show by default as if they were JS output. AlogStructuredLinetest with a sample ndjson event would cover it.
Nits / questions
ios-log-entry.ts:65: if the stdio subsystem arrives without a category,${entry.category}printsundefined:. Fall back tostdout.prepare-controller.ts:530:forwardStdio/logFormatare applied after...nsConfig, so a user can't opt out in a debug build. Is that intended?- Docs could note that stderr is only forwarded on devices.
- On iOS versions where
NSLogalso goes to os_log, would--log debugprint eachNSLogtwice (Foundation:andstderr:)? - Release notes should name the minimum runtime version (NativeScript/ios#532).
071afe8 to
aaff55c
Compare
717c360 to
4e75758
Compare
|
I restacked this onto #6179. Only your commit remains (
CI is green. One caveat: the syslog line format comes from your description and the simulator fixtures, not from a real device line. Please check it on hardware, and update the description: it still says these lines "aren't hidden by scope there". |
Debug builds ask the runtime to forward stdout and stderr through forwardStdio in the app's package.json. They arrive under the org.nativescript.stdio subsystem and show from --log debug, like the rest of the app's native output and as Xcode's console does, labeled with their stream.
…slog relay When a device falls back to the syslog relay, forwarded stdout and stderr lines arrive as plain text tagged "[org.nativescript.stdio:<stream>]" from the NativeScript image, so the filter let them through at the default --log level and the default scope was no longer JS only. They are now shown from --log debug, as on the structured path, and labeled with their stream the same way. A stdio entry without a category is labeled stdout instead of "undefined", and a test pins the simulator's ndjson subsystem and category fields, since stdio entries missing them would show at the default level.
4e75758 to
e512966
Compare
Draft for the same reason as its base: it can't compile until
ios-device-libis released and bumped.What is the current behavior?
print()output and, on devices,NSLognever reach the CLI, even with--log debug, because the app's stdio is/dev/null.What is the new behavior?
forwardStdioto the app'spackage.json, next tologFormat.org.nativescript.stdiosubsystem show from--log debugup, labeledstdout:orstderr:, like the rest of the app's native output and Xcode's console.If a device falls back to the syslog relay, forwarded lines arrive as ordinary syslog text with the subsystem visible in them. They aren't hidden by scope there.
Testing
Results are in NativeScript/ios#532, and unit tests cover the scope, labels, stitching and the key. Release prepare leaves the key out.
Part of a stack
Base: #6179. Needs NativeScript/ios#532.