log exceptions only in debug mode

This commit is contained in:
Ozzieisaacs
2020-12-11 16:46:02 +01:00
parent 8b605aeaa8
commit d9b22fd513
7 changed files with 44 additions and 12 deletions
+4 -1
View File
@@ -156,5 +156,8 @@ def on_received_watch_confirmation():
move(os.path.join(tmp_dir, "tmp_metadata.db"), dbpath)
calibre_db.reconnect_db(config, ub.app_DB_path)
except Exception as e:
log.exception(e)
if config.config_log_level == logger.logging.DEBUG:
log.exception(e)
else:
log.error(e)
return ''