Skip to content

fix: route sdk logs through app logger#3159

Merged
CharlVS merged 1 commit intodevfrom
codex/add-sdk-logging-to-app
Sep 30, 2025
Merged

fix: route sdk logs through app logger#3159
CharlVS merged 1 commit intodevfrom
codex/add-sdk-logging-to-app

Conversation

@CharlVS
Copy link
Copy Markdown
Collaborator

@CharlVS CharlVS commented Sep 30, 2025

Summary

  • forward KomodoDefiSdk log stream entries into the app logger by wiring the onLog callback

Testing

  • flutter analyze (fails: The current Flutter SDK version is 3.32.5 but the project requires >=3.35.3)

https://chatgpt.com/codex/tasks/task_e_68db7b2f37dc8326aaae805c872237fc


Note

Forwards KomodoDefiSdk logs to the app logger by wiring onLog in MM2 and adding a _handleSdkLog handler.

  • Logging:
    • Wire KomodoDefiSdk onLog callback in MM2 constructor to route SDK logs.
    • Add _handleSdkLog to forward messages via log(..., path: 'KomodoDefiSdk').ignore().

Written by Cursor Bugbot for commit 7b8d798. This will update automatically on new commits. Configure here.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Sep 30, 2025

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.

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

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/add-sdk-logging-to-app

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
🧪 Early access (Sonnet 4.5): enabled

We are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience.

Note:

  • Public repositories are always opted into early access features.
  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.

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

@CharlVS CharlVS changed the title feat: route sdk logs through app logger fix: route sdk logs through app logger Sep 30, 2025
@github-actions
Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit 7b8d798):

https://walletrc--pull-3159-merge-680owxwq.web.app

(expires Tue, 07 Oct 2025 07:01:44 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: f66a4ff03faa546f12f0ae5a841bd9eff2714dcc

@CharlVS CharlVS requested a review from Copilot September 30, 2025 07:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR forwards KomodoDefiSdk log entries to the app logger by implementing a log callback mechanism. The change ensures SDK logs are properly routed through the application's logging system for better debugging and monitoring capabilities.

  • Adds log callback wiring to route SDK logs through the app logger
  • Implements a handler method to forward SDK messages with proper path tagging

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread lib/mm2/mm2.dart
return req;
}

void _handleSdkLog(String message) {
Copy link

Copilot AI Sep 30, 2025

Choose a reason for hiding this comment

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

The .ignore() call should have a comment explaining why the return value is being ignored, or consider handling potential logging errors appropriately.

Suggested change
void _handleSdkLog(String message) {
void _handleSdkLog(String message) {
// Logging errors are intentionally ignored because logging failures should not impact application flow.

Copilot uses AI. Check for mistakes.
@CharlVS CharlVS merged commit bfb650d into dev Sep 30, 2025
8 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants