-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add global SDK logger #242
Conversation
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.
I suggest having a look at libs/sdk-core/src/logger.rs on:
To ensure env_logger
module filters are applied on Dart & UniFFI loggers.
I can also apply these changes in scope of another PR.
@erdemyerebasmaz looks like that's still under review, so it's not in its final form and might still undergo changes. How about replicating that change here once that PR is merged, and until then sticking with this PR? |
# Conflicts: # lib/core/src/sdk.rs
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.
Looks good, small NITs.
@ok300 I saw you added the |
# Conflicts: # lib/bindings/src/breez_liquid_sdk.udl # lib/core/Cargo.toml # lib/core/src/bindings.rs # lib/core/src/model.rs # lib/core/src/sdk.rs # packages/react-native/android/src/main/java/com/breezliquidsdk/BreezLiquidSDKMapper.kt # packages/react-native/ios/BreezLiquidSDKMapper.swift # packages/react-native/src/index.ts
@dangeross done: 80b3b77 |
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.
Look good, I checked over all the RN changes. I think just the method naming is in question?
Thanks @dangeross . Yes, only the method signature is open (name and arg type). |
Return a LiquidSdkError::Generic instead of Anyhow error when initializing log stream on Dart bindings
@dangeross @erdemyerebasmaz I updated and re-generated the bindings, can you please re-check if all looks good? |
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.
LGTM
This PR adds a global logger similar (almost identical) to Breez SDK.
To setup logging, the Rust interface uses
LiquidSdk::init_logging(data_dir, logger)
and the uniffi bindings useset_log_stream(LogStream log_stream)
.Closes #236