Implemented a debug logging feature that can be turned on/off from preferences

This commit is contained in:
2021-04-20 10:23:55 -05:00
parent 197e649afb
commit 1d9e6f8074
7 changed files with 12 additions and 4 deletions

View File

@@ -53,6 +53,7 @@ class configurationPresenter(base.basePresenter):
self.send_message("set_language", language=id)
self.send_message("set", tab="general", setting="load_images", value=self.session.settings["general"]["load_images"])
self.send_message("set", tab="general", setting="use_proxy", value=config.app["app-settings"]["use_proxy"])
self.send_message("set", tab="general", setting="debug_logging", value=config.app["app-settings"]["debug_logging"])
self.send_message("set", tab="general", setting="update_channel", value=self.get_update_channel_label(self.session.settings["general"]["update_channel"]))
self.send_message("create_tab", tab="buffers")
self.send_message("set", tab="buffers", setting="wall_buffer_count", value=self.session.settings["buffers"]["count_for_wall_buffers"])
@@ -89,7 +90,7 @@ class configurationPresenter(base.basePresenter):
raise AttributeError("The setting you specified is not present in the config file.")
# check if certain settings have been changed so we'd restart the client.
# List of app settings that require a restart after being changed.
settings_needing_restart = ["language", "use_proxy", "input_device", "output_device"]
settings_needing_restart = ["language", "use_proxy", "input_device", "output_device", "debug_logging"]
if value != config.app[section][setting] and setting in settings_needing_restart:
self.needs_restart = True
config.app[section][setting] = value