-
Notifications
You must be signed in to change notification settings - Fork 101
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(SDK-2217): add logger with loglevel support #1005
base: main
Are you sure you want to change the base?
Conversation
add logger with loglevel support
* @constructor | ||
*/ | ||
|
||
Logger = function() { |
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.
Since this is a wrapper over the native console
, should we include a tag or namespace like BranchSDK
, so that messages emitted from this logger are easily filterable?
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.
something like BranchSDK::<error message>
?
add logger with loglevel support
Pull Request Template
Description
The logger supports different log levels, enabling developers to control the verbosity of log messages based on their requirements.
Logger Implementation
The Web SDK Logger is implemented as part of the Web SDK package. It provides methods for setting the log level and logging messages at various levels of severity.
Log Levels
The following log levels are supported:
Usage
Setting Log Level
set the
logLevel
method inside init optionsFixes # (issue) : SDK-2217
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
JS Budget Check
Please mention the size in kb before abd after this PR
Checklist:
Mentions:
List the person or team responsible for reviewing proposed changes.
cc @BranchMetrics/saas-sdk-devs for visibility.