Logger messages (#818)
* Change the way logger messages are generated by using the printf-like method * Use single quotes around log values that can be empty strings * Fix bug in log message
This commit is contained in:
committed by
GitHub
parent
671888b6ea
commit
1b89d0a4f0
+2
-2
@@ -43,7 +43,7 @@ def logException():
|
||||
"""Log the content of an exception message.
|
||||
"""
|
||||
exType, exValue, _ = sys.exc_info()
|
||||
logger.error("%s: %s" % (exType.__name__, str(exValue).strip("'")))
|
||||
logger.error("%s: %s", exType.__name__, str(exValue).strip("'"))
|
||||
|
||||
|
||||
# =============================================================================================== #
|
||||
@@ -159,7 +159,7 @@ def exceptionHandler(exType, exValue, exTrace):
|
||||
from traceback import print_tb
|
||||
from PyQt5.QtWidgets import qApp
|
||||
|
||||
logger.critical("%s: %s" % (exType.__name__, str(exValue)))
|
||||
logger.critical("%s: %s", exType.__name__, str(exValue))
|
||||
print_tb(exTrace)
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user