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

Don't panic if the logger is initialized twice in Wallet FFI #1863

Merged
merged 2 commits into from
May 14, 2020

Conversation

philipr-za
Copy link
Contributor

Description

When the wallet FFI container is initialized the global Rust logger is started. It would panic if the global logger was already set which happened in the iOS environment. This PR stops that panic and just logs it as an error.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Feature refactor (No new feature or functional changes, but performance or technical debt improvements)
  • New Tests
  • Documentation

Checklist:

  • I'm merging against the development branch.
  • I ran cargo-fmt --all before pushing.
  • I have squashed my commits into a single commit.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

StriderDM
StriderDM previously approved these changes May 14, 2020
@philipr-za philipr-za force-pushed the philip-fix-set-logger-error branch from f424e0a to b288ab2 Compare May 14, 2020 15:30
sdbondi
sdbondi previously approved these changes May 14, 2020
Copy link
Member

@sdbondi sdbondi left a comment

Choose a reason for hiding this comment

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

+1

base_layer/wallet_ffi/src/lib.rs Outdated Show resolved Hide resolved
sdbondi
sdbondi previously approved these changes May 14, 2020
Co-authored-by: Stan Bondi <sdbondi@users.noreply.github.com>
@sdbondi sdbondi merged commit 0d60fff into development May 14, 2020
@sdbondi sdbondi deleted the philip-fix-set-logger-error branch May 14, 2020 17:00
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.

3 participants