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: User-defined logger config #6409

Merged
merged 18 commits into from
Aug 28, 2024
Merged

feat: User-defined logger config #6409

merged 18 commits into from
Aug 28, 2024

Conversation

MatiPl01
Copy link
Member

@MatiPl01 MatiPl01 commented Aug 12, 2024

Summary

This PR adds a possibility to customize log level via the level property (limit to just see errors or show errors and warnings) and enable/disable strict mode (via strict property), which will be useful for changes implemented in this PR to show invalid .value access warnings only in the strict mode.

Example recording

Screen.Recording.2024-08-27.at.20.03.27.mp4

Test plan

  • Open EmptyExample (which will be reverted to the original implementation before merging this PR),
  • Change logger settings (e.g. the level property) via Animated.configureLogger,

@MatiPl01 MatiPl01 self-assigned this Aug 12, 2024
@MatiPl01 MatiPl01 requested a review from tjzel August 13, 2024 12:07
@MatiPl01 MatiPl01 force-pushed the @matipl01/configurable-logger branch from d6408fc to b39d25e Compare August 13, 2024 17:59
@MatiPl01 MatiPl01 marked this pull request as ready for review August 13, 2024 17:59
@MatiPl01 MatiPl01 force-pushed the @matipl01/new-logger-console-logs-replacement branch from 386b83a to fba8f74 Compare August 23, 2024 15:15
@MatiPl01 MatiPl01 force-pushed the @matipl01/configurable-logger branch from 722712a to 2249971 Compare August 23, 2024 15:33
Copy link
Collaborator

@tjzel tjzel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some things I don't exactly understand here, please clarify.

packages/react-native-reanimated/src/logger/logger.ts Outdated Show resolved Hide resolved
packages/react-native-reanimated/src/Animated.ts Outdated Show resolved Hide resolved
packages/react-native-reanimated/src/ConfigHelper.ts Outdated Show resolved Hide resolved
packages/react-native-reanimated/jest-setup.js Outdated Show resolved Hide resolved
packages/react-native-reanimated/src/logger/logger.ts Outdated Show resolved Hide resolved
packages/react-native-reanimated/src/logger/logger.ts Outdated Show resolved Hide resolved
@MatiPl01 MatiPl01 force-pushed the @matipl01/new-logger-console-logs-replacement branch from d5d9145 to 8986ccb Compare August 26, 2024 10:37
Base automatically changed from @matipl01/new-logger-console-logs-replacement to main August 26, 2024 12:02
@MatiPl01 MatiPl01 force-pushed the @matipl01/configurable-logger branch from 0e9eec1 to e4bca1d Compare August 26, 2024 12:22
@MatiPl01 MatiPl01 requested a review from tjzel August 27, 2024 18:06
packages/react-native-reanimated/src/runtimes.ts Outdated Show resolved Hide resolved
packages/react-native-reanimated/src/logger/logger.ts Outdated Show resolved Hide resolved
packages/react-native-reanimated/src/initializers.ts Outdated Show resolved Hide resolved
packages/react-native-reanimated/jest-setup.js Outdated Show resolved Hide resolved
packages/react-native-reanimated/src/initializers.ts Outdated Show resolved Hide resolved
@MatiPl01 MatiPl01 requested a review from tjzel August 28, 2024 14:12
@MatiPl01 MatiPl01 force-pushed the @matipl01/configurable-logger branch from 68d8421 to af6bba6 Compare August 28, 2024 14:30
Copy link
Collaborator

@tjzel tjzel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good now!

@MatiPl01 MatiPl01 added this pull request to the merge queue Aug 28, 2024
Merged via the queue into main with commit 8a2749e Aug 28, 2024
9 checks passed
@MatiPl01 MatiPl01 deleted the @matipl01/configurable-logger branch August 28, 2024 15: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