mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Limit log spam from FrameBasedAnimationDriver (#44782)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/44782 ## Changelog: [Android] [Fixed] - Reduce maximum log spam from FrameBasedAnimationDriver Reviewed By: ahmed-shehata Differential Revision: D58135399 fbshipit-source-id: 355524b9b96bb1fc9de73fddb6486b1c377da077
This commit is contained in:
committed by
Facebook GitHub Bot
parent
a1e8118541
commit
42299499d8
+5
-1
@@ -30,6 +30,7 @@ class FrameBasedAnimationDriver extends AnimationDriver {
|
||||
private double mFromValue;
|
||||
private int mIterations;
|
||||
private int mCurrentLoop;
|
||||
private int logCount = 0;
|
||||
|
||||
FrameBasedAnimationDriver(ReadableMap config) {
|
||||
resetConfig(config);
|
||||
@@ -81,7 +82,10 @@ class FrameBasedAnimationDriver extends AnimationDriver {
|
||||
if (ReactBuildConfig.DEBUG) {
|
||||
throw new IllegalStateException(message);
|
||||
} else {
|
||||
FLog.w(ReactConstants.TAG, message);
|
||||
if (logCount < 100) {
|
||||
FLog.w(ReactConstants.TAG, message);
|
||||
logCount++;
|
||||
}
|
||||
return;
|
||||
}
|
||||
} else if (mHasFinished) {
|
||||
|
||||
Reference in New Issue
Block a user