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:
Veronica Berglyd Olsen
2021-07-02 10:22:00 +02:00
committed by GitHub
parent 671888b6ea
commit 1b89d0a4f0
20 changed files with 219 additions and 219 deletions
+4 -4
View File
@@ -73,7 +73,7 @@ class NWDoc():
return None
docFile = self._docHandle+".nwd"
logger.debug("Opening document %s" % docFile)
logger.debug("Opening document: %s", docFile)
docPath = os.path.join(self.theProject.projContent, docFile)
self._fileLoc = docPath
@@ -120,7 +120,7 @@ class NWDoc():
self.theProject.ensureFolderStructure()
docFile = self._docHandle+".nwd"
logger.debug("Saving document %s" % docFile)
logger.debug("Saving document: %s", docFile)
docPath = os.path.join(self.theProject.projContent, docFile)
docTemp = os.path.join(self.theProject.projContent, docFile+"~")
@@ -170,7 +170,7 @@ class NWDoc():
if os.path.isfile(chkFile):
try:
os.unlink(chkFile)
logger.debug("Deleted: %s" % chkFile)
logger.debug("Deleted: %s", chkFile)
except Exception as e:
self._docError = str(e)
return False
@@ -237,7 +237,7 @@ class NWDoc():
self._docMeta["layout"] = nwItemLayout[metaBits[1]]
else:
logger.debug("Ignoring meta data: '%s'" % metaLine.strip())
logger.debug("Ignoring meta data: '%s'", metaLine.strip())
return