Browse Source
android: enable full logging if DEBUG build
bip39-recovery
SomberNight
5 years ago
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
2 changed files with
9 additions and
4 deletions
-
electrum/logging.py
-
run_electrum
|
|
@ -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) |
|
|
|
|
|
|
|
|
|
@ -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', |
|
|
|
} |
|
|
|