Browse Source

android: enable full logging if DEBUG build

bip39-recovery
SomberNight 5 years ago
parent
commit
625f985f22
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 9
      electrum/logging.py
  2. 4
      run_electrum

9
electrum/logging.py

@ -232,10 +232,13 @@ def configure_logging(config):
verbosity_shortcuts = config.get('verbosity_shortcuts')
_configure_verbosity(verbosity=verbosity, verbosity_shortcuts=verbosity_shortcuts)
log_to_file = config.get('log_to_file', False)
is_android = 'ANDROID_DATA' in os.environ
if is_android or not config.get('log_to_file', False):
pass # disable file logging
else:
if is_android:
from jnius import autoclass
build_config = autoclass("org.electrum.electrum.BuildConfig")
log_to_file |= bool(build_config.DEBUG)
if log_to_file:
log_directory = pathlib.Path(config.path) / "logs"
_configure_file_logging(log_directory)

4
run_electrum

@ -307,8 +307,10 @@ if __name__ == '__main__':
# config is an object passed to the various constructors (wallet, interface, gui)
if is_android:
from jnius import autoclass
build_config = autoclass("org.electrum.electrum.BuildConfig")
config_options = {
'verbosity': '',
'verbosity': '*' if build_config.DEBUG else '',
'cmd': 'gui',
'gui': 'kivy',
}

Loading…
Cancel
Save