Skip to content
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

[SDK-2384] Add BranchLogLevel for setting minimum logging level #1189

Merged
merged 4 commits into from
Apr 24, 2024

Conversation

nsingh-branch
Copy link
Contributor

Reference

SDK-2384 -- Add setting log levels to BranchLogger

Description

Add a new way to set the minimum log level in the BranchLogger class by creating BranchLogLevel. This allows us to add log level checks throughout the SDK and gives clients the ability to reduce logs if desired.

Testing Instructions

Call the new enabledLogging methods with the various BranchLogLevels and observe that only the correct logs are appearing.

Risk Assessment [ LOW]

  • I, the PR creator, have tested — integration, unit, or otherwise — this code.

Reviewer Checklist (To be checked off by the reviewer only)

  • JIRA Ticket is referenced in PR title.
  • Correctness & Style
    • Conforms to AOSP Style Guides
    • Mission critical pieces are documented in code and out of code as needed.
  • Unit Tests reviewed and test issue sufficiently.
  • Functionality was reviewed in QA independently by another engineer on the team.

cc @BranchMetrics/saas-sdk-devs for visibility.

BranchLogger.logAlways(GOOGLE_VERSION_TAG);
BranchLogger.setLoggingEnabled(true);
public static void enableLogging(IBranchLoggingCallbacks iBranchLogging) {
enableLogging(iBranchLogging, BranchLogger.BranchLogLevel.DEBUG);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean customers using this feature will no longer produce logs for VERBOSE by default? This will break those workflows.

If it's not set, the original behavior should be maintained.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could also break our own automation tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated it to set logs to Verbose when using a callback.

@nsingh-branch nsingh-branch merged commit 49772ca into master Apr 24, 2024
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants