这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@joshuayoes
Copy link
Contributor

@joshuayoes joshuayoes commented Dec 1, 2023

This PR adds a new core plugin called trackGlobalLogs to the useReactNative default plugins, which will automatically track console.log, console.warn, and console.debug without needing to do calls to Reactotron.log or console.tron.log.

This has been enabled in Ignite for several releases now, so we will be able to remove this snippet.

Monkey patching globals like console log is not ideal but we determined that we would expect a debugging tool to collect logs. We also already do similar strategies for inspecting network traffic, so we think this is a tradeoff worth making.

@sweep-ai-deprecated
Copy link

Apply Sweep Rules to your PR?

  • Apply: All new business logic should have corresponding unit tests.
  • Apply: Refactor large functions to be more modular.
  • Apply: Add docstrings to all functions and file headers.

@joshuayoes joshuayoes self-assigned this Dec 1, 2023
@joshuayoes joshuayoes added this to the 3.0.0 milestone Dec 1, 2023
@joshuayoes joshuayoes force-pushed the feat/enable-track-global-errors branch from 0a24040 to f75dc2d Compare December 1, 2023 23:18
@joshuayoes
Copy link
Contributor Author

This will requite a new PR to ignite to update to the latest version to remove this snippet, and remove some references to console.tron.log to prevent duplicate logs

@joshuayoes joshuayoes merged commit cee53c8 into beta Dec 2, 2023
@joshuayoes joshuayoes deleted the feat/enable-track-global-errors branch December 2, 2023 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants