From fe0978a8b2932ade893be5f3ef95951bb869f955 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Thu, 5 May 2022 16:19:26 +0200 Subject: [PATCH 1/3] Tweak grammar --- openpype/lib/applications.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/openpype/lib/applications.py b/openpype/lib/applications.py index b52da52dc9..a84ff990b2 100644 --- a/openpype/lib/applications.py +++ b/openpype/lib/applications.py @@ -1012,8 +1012,8 @@ class ApplicationLaunchContext: self.log.debug("Discovery of launch hooks started.") paths = self.paths_to_launch_hooks() - self.log.debug("Paths where will look for launch hooks:{}".format( - "\n- ".join(paths) + self.log.debug("Paths searched for launch hooks:\n{}".format( + "\n".join("- {}".format(path) for path in paths) )) all_classes = { @@ -1023,7 +1023,7 @@ class ApplicationLaunchContext: for path in paths: if not os.path.exists(path): self.log.info( - "Path to launch hooks does not exists: \"{}\"".format(path) + "Path to launch hooks does not exist: \"{}\"".format(path) ) continue @@ -1044,7 +1044,8 @@ class ApplicationLaunchContext: hook = klass(self) if not hook.is_valid: self.log.debug( - "Hook is not valid for current launch context." + "Hook is not valid for current " + "launch context: {}".format(str(hook)) ) continue From 840e830b30442830b5f8813d2e40113872c14dee Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Fri, 6 May 2022 11:00:53 +0200 Subject: [PATCH 2/3] Log name of class in a more readable manner --- openpype/lib/applications.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/openpype/lib/applications.py b/openpype/lib/applications.py index a84ff990b2..01bd2768ed 100644 --- a/openpype/lib/applications.py +++ b/openpype/lib/applications.py @@ -1045,13 +1045,13 @@ class ApplicationLaunchContext: if not hook.is_valid: self.log.debug( "Hook is not valid for current " - "launch context: {}".format(str(hook)) + "launch context: {}".format(klass.__name__) ) continue if inspect.isabstract(hook): self.log.debug("Skipped abstract hook: {}".format( - str(hook) + klass.__name__ )) continue @@ -1063,7 +1063,8 @@ class ApplicationLaunchContext: except Exception: self.log.warning( - "Initialization of hook failed. {}".format(str(klass)), + "Initialization of hook failed: " + "{}".format(klass.__name__), exc_info=True ) From 1eb8300831ccec8ace6d3a030464197b9d35bcb5 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Fri, 6 May 2022 11:43:49 +0200 Subject: [PATCH 3/3] Less scary log message --- openpype/lib/applications.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openpype/lib/applications.py b/openpype/lib/applications.py index 01bd2768ed..6ade33b59c 100644 --- a/openpype/lib/applications.py +++ b/openpype/lib/applications.py @@ -1044,8 +1044,8 @@ class ApplicationLaunchContext: hook = klass(self) if not hook.is_valid: self.log.debug( - "Hook is not valid for current " - "launch context: {}".format(klass.__name__) + "Skipped hook invalid for current launch context: " + "{}".format(klass.__name__) ) continue