-
Notifications
You must be signed in to change notification settings - Fork 319
Bump mapboxBaseAndroid version to 0.6.0
#5620
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
Conversation
|
We'll need to change the default log level as well (since this upgrade changed it to error). |
What do you mean? Isn't that already the case https://github.com/mapbox/mapbox-base-android/blob/1317c85a24cc15e31b922ff6efb146590f71e6a5/liblogger/src/main/java/com/mapbox/common/logger/MapboxLogger.kt#L28 That's the default Lines 24 to 28 in a1ac57f
Lines 107 to 121 in a1ac57f
|
|
@Guardiola31337 the v0.6.0 of based change that the default log level of the default logger instance is error, so only errors are logged. Since we control the log level via Common SDK instead, we need to relax that on the Android logger level: diff --git a/libnavigation-util/build.gradle b/libnavigation-util/build.gradle
index fae24295cf..bf3fe0b109 100644
--- a/libnavigation-util/build.gradle
+++ b/libnavigation-util/build.gradle
@@ -32,6 +32,7 @@ dependencies {
api dependenciesList.mapboxCommonNative
implementation dependenciesList.mapboxCommonOkHttp
api dependenciesList.mapboxAndroidCommon
+ implementation dependenciesList.mapboxLogger
implementation dependenciesList.mapboxAnnotations
apply from: "${rootDir}/gradle/unit-testing-dependencies.gradle"
diff --git a/libnavigation-util/src/main/java/com/mapbox/navigation/utils/internal/LoggerProvider.kt b/libnavigation-util/src/main/java/com/mapbox/navigation/utils/internal/LoggerProvider.kt
index be2409cd3a..81f84a14c0 100644
--- a/libnavigation-util/src/main/java/com/mapbox/navigation/utils/internal/LoggerProvider.kt
+++ b/libnavigation-util/src/main/java/com/mapbox/navigation/utils/internal/LoggerProvider.kt
@@ -7,6 +7,8 @@ import com.mapbox.base.common.logger.model.Tag
import com.mapbox.common.LogConfiguration
import com.mapbox.common.LogWriterBackend
import com.mapbox.common.LoggingLevel
+import com.mapbox.common.logger.MapboxLogger
+import com.mapbox.common.logger.VERBOSE
import com.mapbox.common.module.provider.MapboxModuleProvider
private const val TAG = "Mapbox"
@@ -25,6 +27,10 @@ object LoggerProvider {
MapboxModuleType.CommonLogger
) {
arrayOf()
+ }.apply {
+ if (this is MapboxLogger) {
+ this.logLevel = VERBOSE
+ }
}
} |
|
Well, the problem now arises with the fact that the logger module is designed to be excluded from the build, which means that we should run into a missing class reference during the cast attempt if a custom logger is used (and the default logger is excluded). @DzmitryFomchyn @tobrun thinking whether we shouldn't revert mapbox/mapbox-base-android#65 in the end - a library (like Nav SDK) that uses the modularization setup cannot have access to the default implementations, they should be defined as We face a similar problem in the Common SDK which currently strongly links to I guess there would be an option of using reflection to check if the instance is |
|
This is exactly what I was thinking. We should probably leave it as is (as long as we want to provide that default Also, I thought about reflection as well but I totally agree that it's not worth it here, especially because this is going to be controlled through Common SDK (as above noted). |
|
Closing in favor of #5742 which resolves the concern raised in #5620 (comment). |
Description
Bumps
mapboxBaseAndroidversion to0.6.0.