Fix script logging with name (#33120)

This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2020-03-22 13:29:50 +01:00
1 parent 66402b9b38
commit f95c3e265d
2 files changed
+15 -1

No files matched your search

+3 -1
View File
@@ -817,7 +817,9 @@ class Script:
def _log(self, msg, *args, level=logging.INFO):
if self.name:
msg = f"{self.name}: {msg}"
msg = f"%s: {msg}"
args = [self.name, *args]
if level == _LOG_EXCEPTION:
self._logger.exception(msg, *args)
else: