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

View File

@@ -199,7 +199,10 @@ def getDrive(drive=None, gauth=None):
except RefreshError as e:
log.error("Google Drive error: %s", e)
except Exception as e:
log.exception(e)
if config.config_log_level == logger.logging.DEBUG:
log.exception(e)
else:
log.error(e)
else:
# Initialize the saved creds
gauth.Authorize()