electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit f6a7e6ec7ded068200851c5f7f15f76a24cbc701
parent 3ed502a72886a71081b2dccb5807933b807edc95
Author: SomberNight <somber.night@protonmail.com>
Date:   Wed,  8 May 2019 16:52:04 +0200

logging: don't log to file by default

Leaking addresses/pubkeys/txids is a privacy leak...
but with lightning, logging should be enabled by default, as otherwise
issues would be sometimes impossible to debug...
Well, disable it for now.

Diffstat:
Melectrum/commands.py | 1-
Melectrum/gui/qt/main_window.py | 4++--
Melectrum/logging.py | 2+-
3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/electrum/commands.py b/electrum/commands.py @@ -942,7 +942,6 @@ def add_global_options(parser): group.add_argument("--testnet", action="store_true", dest="testnet", default=False, help="Use Testnet") group.add_argument("--regtest", action="store_true", dest="regtest", default=False, help="Use Regtest") group.add_argument("--simnet", action="store_true", dest="simnet", default=False, help="Use Simnet") - group.add_argument("--disablefilelogging", action="store_true", dest="disablefilelogging", default=None, help="Do not log to file") def get_parser(): # create main parser diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py @@ -3011,9 +3011,9 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger): gui_widgets.append((updatecheck_cb, None)) filelogging_cb = QCheckBox(_("Write logs to file")) - filelogging_cb.setChecked(not self.config.get('disablefilelogging', False)) + filelogging_cb.setChecked(bool(self.config.get('log_to_file', False))) def on_set_filelogging(v): - self.config.set_key('disablefilelogging', v == Qt.Unchecked, save=True) + self.config.set_key('log_to_file', v == Qt.Checked, save=True) filelogging_cb.stateChanged.connect(on_set_filelogging) filelogging_cb.setToolTip(_('Debug logs can be persisted to disk. These are useful for troubleshooting.')) gui_widgets.append((filelogging_cb, None)) diff --git a/electrum/logging.py b/electrum/logging.py @@ -233,7 +233,7 @@ def configure_logging(config): _configure_verbosity(verbosity=verbosity, verbosity_shortcuts=verbosity_shortcuts) is_android = 'ANDROID_DATA' in os.environ - if is_android or config.get('disablefilelogging'): + if is_android or not config.get('log_to_file', False): pass # disable file logging else: log_directory = pathlib.Path(config.path) / "logs"