Skip to content

SDK-6010: Auto-sync Flutter NDLogger level from Core SDK debug level - #78

Merged
CTLalit merged 1 commit into
feat/SDK-6009-flutter-click-attributionfrom
feat/SDK-6010-flutter-log-sync
Aug 13, 2026
Merged

SDK-6010: Auto-sync Flutter NDLogger level from Core SDK debug level#78
CTLalit merged 1 commit into
feat/SDK-6009-flutter-click-attributionfrom
feat/SDK-6010-flutter-log-sync

Conversation

@CTLalit

@CTLalit CTLalit commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Jira: SDK-6010 — epic SDK-5820

Stack (bottom → top):

  1. SDK-6009: Flutter click + viewed attribution extras with element-clicked bridge #77 — SDK-6009 click/view attribution extras + element-clicked bridge
  2. SDK-6010: Auto-sync Flutter NDLogger level from Core SDK debug level #78 — SDK-6010 NDLogger auto-sync from Core debug level
  3. SDK-6011: Regression tests for BOX/video/evaluator #54 parity #79 — SDK-6011 BOX/video/evaluator parity regression tests
  4. SDK-6013: Add iOS podspec + correct pubspec SDK/Flutter floor #81 — SDK-6013 iOS podspec + honest pubspec SDK/Flutter floor

Base of stack: feat/SDK-5821-flutter-models (PR #38main).


Stack created with GitHub Stacks CLIGive Feedback 💬

The Flutter SDK's NDLogger ignored the host Core SDK's configured debug
level — NDLogger.syncFromCoreSdk existed but nothing called it. Align
Flutter with the shipped Android/iOS CleverTapAutoWire behaviour (SDK-5860).

- NativeDisplayBridge.syncLogLevelFromCoreSdk(): reads the Core debug level
  over the platform channel (new getCoreDebugLevel method) and forwards it to
  NDLogger.syncFromCoreSdk. No-op once the client called setLogLevel
  (client-wins via NDLogger.explicitlySet); graceful no-op when no bridge /
  Core SDK is wired (null or PlatformException leaves the level intact).
- Lazily triggered once per app run from the first fetchConfig (fire-and-forget
  so config fetch never blocks); also public so the host can call it right
  after wiring.
- Native plugins: NativeDisplayPluginBridge gains getCoreDebugLevel(): Int?
  (Android, CleverTapAPI.getDebugLevel()) / coreDebugLevel() -> NSNumber?
  (iOS, KVC debugLevel). iOS handles the arg-less method before the args guard.
- NDLogger.resetForTest() (@VisibleForTesting) for test isolation of the
  process-global logger state; no change to syncFromCoreSdk/setLevel logic.
- Tests: NDLogLevel.fromInt mapping (incl. unknown→DEBUG) + syncFromCoreSdk
  semantics + client-wins + null/exception no-op bridge cases.

flutter analyze clean; flutter test 192/192 pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 64e6d12f-289d-476e-b6af-4c03d89f8716

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@CTLalit
CTLalit merged commit 8bf0b73 into feat/SDK-5821-flutter-models Aug 13, 2026
1 check passed
@clevertap-heimdall clevertap-heimdall Bot added the type/enhancement Improves or extends an existing capability (incl. performance) label Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/enhancement Improves or extends an existing capability (incl. performance)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant