mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
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.
This commit is contained in:
parent
3ed502a728
commit
f6a7e6ec7d
3 changed files with 3 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue