react-native-macos/React/Base
Leo Natan f501ed682a Use Apple unified logging API (os_log) (#27892)
Summary:
As discussed in https://github.com/facebook/react-native/issues/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 https://github.com/facebook/react-native/issues/27863

## Changelog

[iOS] [Changed] - Use Apple unified logging API (os_log)
Pull Request resolved: https://github.com/facebook/react-native/pull/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
2020-01-28 15:23:59 -08:00
..
Surface Fix typo in RCTSurface log 2020-01-13 14:23:54 -08:00
RCTAssert.h Extract RCTFormatStackTrace function from RCTFormatError 2019-11-14 10:33:14 -08:00
RCTAssert.m Extract RCTFormatStackTrace function from RCTFormatError 2019-11-14 10:33:14 -08:00
RCTBridge+Private.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTBridge.h Deprecate RCTBridgeWillReloadNotification [3/n] 2019-10-30 12:23:24 -07:00
RCTBridge.m Enabling RCTWebSocket on UIKitForMac (macOS Catalyst) (#27469) 2019-12-17 16:52:29 -08:00
RCTBridgeDelegate.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTBridgeMethod.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTBridgeModule.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTBundleURLProvider.h Expose [RCTBundleURLProvider isPackagerRunning] publicly (#27012) 2019-10-30 08:36:45 -07:00
RCTBundleURLProvider.m Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTComponentEvent.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTComponentEvent.m Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTConstants.h emit Dimensions change enent when app goes split screen 2019-12-11 10:04:20 -08:00
RCTConstants.m emit Dimensions change enent when app goes split screen 2019-12-11 10:04:20 -08:00
RCTConvert.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTConvert.m Re-land [RN] iOS - deprecate iOS 9 support by removing runtime checks for 10.0+ 2020-01-15 09:23:30 -08:00
RCTCxxConvert.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTCxxConvert.m Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTDefines.h Enabling RCTWebSocket on UIKitForMac (macOS Catalyst) (#27469) 2019-12-17 16:52:29 -08:00
RCTDisplayLink.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTDisplayLink.m Ensure RCTDisplayLink and RCTTurboModuleManager are cleaned up properly [3/N] 2019-11-06 14:20:56 -08:00
RCTErrorCustomizer.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTErrorInfo.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTErrorInfo.m Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTEventDispatcher.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTEventDispatcher.m Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTFrameUpdate.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTFrameUpdate.m Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTImageSource.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTImageSource.m Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTInvalidating.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTJSInvokerModule.h Introducing RCTJSInvokerModule [1/N] 2019-12-23 13:52:03 -08:00
RCTJSStackFrame.h Render collapsed frames in RedBox 2019-10-22 11:05:36 -07:00
RCTJSStackFrame.m Render collapsed frames in RedBox 2019-10-22 11:05:36 -07:00
RCTJavaScriptExecutor.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTJavaScriptLoader.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTJavaScriptLoader.mm Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTKeyCommands.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTKeyCommands.m Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTLog.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTLog.mm Use Apple unified logging API (os_log) (#27892) 2020-01-28 15:23:59 -08:00
RCTManagedPointer.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTManagedPointer.mm Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTModuleData.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTModuleData.mm Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTModuleMethod.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTModuleMethod.mm Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTMultipartDataTask.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTMultipartDataTask.m Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTMultipartStreamReader.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTMultipartStreamReader.m Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTNullability.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTParserUtils.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTParserUtils.m Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTPerformanceLogger.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTPerformanceLogger.m Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTRedBoxSetEnabled.h Make RedBox TurboModule-compatible 2019-11-04 16:07:23 -08:00
RCTRedBoxSetEnabled.m Make RedBox TurboModule-compatible 2019-11-04 16:07:23 -08:00
RCTReloadCommand.h Fix Reload stats 2019-11-18 16:17:09 -08:00
RCTReloadCommand.m Fix Reload stats 2019-11-18 16:17:09 -08:00
RCTRootContentView.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTRootContentView.m Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTRootView.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTRootView.m emit Dimensions change enent when app goes split screen 2019-12-11 10:04:20 -08:00
RCTRootViewDelegate.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTRootViewInternal.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTTVRemoteHandler.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTTVRemoteHandler.m Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTTouchEvent.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTTouchEvent.m Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTTouchHandler.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTTouchHandler.m Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTURLRequestDelegate.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTURLRequestHandler.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTUtils.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTUtils.m Allow extensions to set their own presentedViewController 2019-11-22 00:47:22 -08:00
RCTUtilsUIOverride.h Allow extensions to set their own presentedViewController 2019-11-22 00:47:22 -08:00
RCTUtilsUIOverride.m Allow extensions to set their own presentedViewController 2019-11-22 00:47:22 -08:00
RCTVersion.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTVersion.m Lazily create RCTVersion dict 2019-07-12 16:51:28 -07:00
RCTWeakProxy.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTWeakProxy.m Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00