-
Notifications
You must be signed in to change notification settings - Fork 131
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
Add API to control logs for animators #474
Conversation
plugin-animation/src/main/java/com/mapbox/maps/plugin/animation/CameraAnimationsPluginImpl.kt
Outdated
Show resolved
Hide resolved
...n-animation/src/test/java/com/mapbox/maps/plugin/animation/CameraAnimationsPluginImplTest.kt
Outdated
Show resolved
Hide resolved
Upstream we just merged the ability to filter out categories from common SDK. I rather see us moving to that solution instead. We will however need to add the log configuration by default to disable log messages for users and remove the filter if we want to enable it again. |
After internal convo, le'ts move forward on exposing debugMode. This can use the internal API under the hood. |
bfc4edc
to
5e4b83a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* If debug mode is enabled extra logs will be written about animation lifecycle and | ||
* some other events that may be useful for debugging. | ||
*/ | ||
var debugMode: Boolean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I've taken a look at other plugins, there's no sense in adding it everywhere. We don't have that massive logs anywhere as well as some true debug mode. That's why I closed internal tickets related to similar API for all the plugins and decided to implement it in camera only due to a lot of requests.
PRs must be submitted under the terms of our Contributor License Agreement CLA.
Fixes: #243
Pull request checklist:
mapbox-maps-android
changelog:<changelog>Add API to control logging for animation plugin and disable debug logs by default.</changelog>
.Summary of changes
Add API to disable not critical logs for camera plugin.
debugMode
is set to false by default. Logs could be enabled with:Additionally even if logs are enabled non-critical logs are downgraded to use
Logger.d
instead ofLogger.i
.User impact (optional)