Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add console logging support for Frame Processors #297

Merged
merged 11 commits into from
Jul 30, 2021

Conversation

mrousavy
Copy link
Owner

@mrousavy mrousavy commented Jul 23, 2021

What

Until now you could not log something to the Metro JS console. The only way to log something was through the native HostFunction _log, which only logged to Xcode Logs/Android Logcat.
This PR changes this and adds support for using console to log messages to the Metro console. (e.g. console.log, console.debug, etc)

When trying to add support for this, I noticed that there were a few threading issues with the way Frame Processors are currently implemented - mainly that they use the reanimated UI Thread Scheduler for scheduling stuff, which (afaik) should only be a problem when you passed a function to a FP Plugin. But this PR fixes this by implementing a custom Scheduler.

Changes

Tested on

  • iPhone 11 Pro
  • Android Simulator

Related issues

@mrousavy mrousavy changed the title feat: Add console logging support feat: Add console logging support for Frame Processors Jul 23, 2021
@mrousavy mrousavy added ☕️ js Affects the JS/TS codebase ✨ feature Proposes a new feature or enhancement 🍏 ios Issue affects the iOS platform 🐛 bug Something isn't working 🤖 android Issue affects the Android platform labels Jul 25, 2021
@mrousavy
Copy link
Owner Author

@mrousavy
Copy link
Owner Author

Possibly also waiting for software-mansion/react-native-reanimated#2220

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 android Issue affects the Android platform 🐛 bug Something isn't working ✨ feature Proposes a new feature or enhancement 🍏 ios Issue affects the iOS platform ☕️ js Affects the JS/TS codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant