Use Apple unified logging API (os_log)#27892
Closed
LeoNatan wants to merge 1 commit into
Closed
Conversation
Contributor
Author
|
Not sure what is going on with the tests, but I don't think it's related to my change. |
Contributor
facebook-github-bot
left a comment
There was a problem hiding this comment.
@PeteTheHeat has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
PeteTheHeat
approved these changes
Jan 28, 2020
Collaborator
|
This pull request was successfully merged by @LeoNatan in f501ed6. When will my fix make it into a release? | Upcoming Releases |
osdnk
pushed a commit
to osdnk/react-native
that referenced
this pull request
Mar 9, 2020
Summary: As discussed in facebook#27863, the following changes were made to modernize the internal default logging function: - `RCTDefaultLogThreshold` is now set to `RCTLogLevelTrace` in both release and debug builds—the Apple logging system will discard uncollected log entires, while allowing for collection when needed - `RCTLogLevel` is translated to the appropriate log type - The log subsystem is "com.facebook.react.log" - `RCTLogSource` translates to the appropriate category ("native"/"javascript") - Log the provided message using `os_log_with_type` Closes facebook#27863 ## Changelog [iOS] [Changed] - Use Apple unified logging API (os_log) Pull Request resolved: facebook#27892 Test Plan: ## From Original PR Ran a test app in the iOS simulator, and verified that logs are correctly displayed in Console.app as well as using the following command: ```sh /usr/bin/xcrun simctl spawn booted log stream --level debug --style compact --predicate 'process=="ReactNativeTesterApp" && subsystem=="com.facebook.react.log"' ``` ## Peter's Test Plan 1. Apply P125583473 2. Verify log output in Xcode P125583504 3. Apply this diff 4. Verify log output in Xcode P125583597 These appear unchanged, after digging into why, I realized that FB doesn't even use the default log function, we inject a custom one [here](https://fburl.com/diffusion/887a1axs). So this PR shouldn't affect us at all. :) Differential Revision: D19605414 Pulled By: PeteTheHeat fbshipit-source-id: 1d70fb702c337a759905d4a65a951a31353ce775
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.
Summary
As discussed in #27863, the following changes were made to modernize the internal default logging function:
RCTDefaultLogThresholdis now set toRCTLogLevelTracein both release and debug builds—the Apple logging system will discard uncollected log entires, while allowing for collection when neededRCTLogLevelis translated to the appropriate log typeRCTLogSourcetranslates to the appropriate category ("native"/"javascript")os_log_with_typeCloses #27863
Changelog
[iOS] [Changed] - Use Apple unified logging API (os_log)
Test Plan
Ran a test app in the iOS simulator, and verified that logs are correctly displayed in Console.app as well as using the following command:
/usr/bin/xcrun simctl spawn booted log stream --level debug --style compact --predicate 'process=="ReactNativeTesterApp" && subsystem=="com.facebook.react.log"'