Reorder theDEBUG and INFO log levels. This is done to keep it in parity with v1.
Change all the log ENUM values in the capital letter.
Change default log level to NONE. This is done to keep it in parity with v1.
Remove custom logger: Now, no one can pass the custom logger while initialising the SDK.
Add a new logLevel argument to the ConfigurationAndroid class. It needs to be used during SDK initialization. This simplifies the process to set the log level. This is in parity with v1!. Here is the code snippet to set the log level:
Added withLogLevel in the ConfigurationAndroidBuilder.java.
Changed AndroidLogger from object to class.
Changed KotlinLogger from object to class.
Also optimised this class and default argument.
Fixed failing test cases related to Android and Kotlin logger class.
Added ConfigurationAndroidBuilderTest class. This will test the log behaviour.
In ConfigurationBuilder.java: Removed setting of custom logger and added a builder method to set logLevel.
Removed level value from Logger.kt class.
Renamed Logger class to RudderLogger class.
NOTE: Previous way to change the logLevel is still possible i.e., this is still allowed: config.logger.activate(Logger.LogLevel.Info). If we want to restrict this then we need to make an architectural level change, which doesn't seems to be possible given the timeline!
Fixes # (issue)
Type of change
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update
Checklist:
[ ] Version upgraded (project, README, gradle, podspec etc)
[ ] My code follows the style guidelines of this project
[ ] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have added unit tests for the code
[ ] I have made corresponding changes to the documentation
Description
DEBUG
andINFO
log levels. This is done to keep it in parity with v1.NONE
. This is done to keep it in parity with v1.custom logger
: Now, no one can pass the custom logger while initialising the SDK.logLevel
argument to theConfigurationAndroid
class. It needs to be used during SDK initialization. This simplifies the process to set the log level. This is in parity with v1!. Here is the code snippet to set the log level:withLogLevel
in the ConfigurationAndroidBuilder.java.AndroidLogger
from object to class.KotlinLogger
from object to class.ConfigurationAndroidBuilderTest
class. This will test the log behaviour.ConfigurationBuilder.java
: Removed setting ofcustom logger
and added a builder method to set logLevel.level
value fromLogger.kt
class.Logger
class toRudderLogger
class.NOTE: Previous way to change the logLevel is still possible i.e., this is still allowed:
config.logger.activate(Logger.LogLevel.Info)
. If we want to restrict this then we need to make an architectural level change, which doesn't seems to be possible given the timeline!Fixes # (issue)
Type of change
Checklist: