From 242b1a4e50371128b5968c58a32540a76f16bef1 Mon Sep 17 00:00:00 2001
From: Pierre-Antoine Rouby <pierre-antoine.rouby@inrae.fr>
Date: Mon, 9 Oct 2023 16:55:54 +0200
Subject: [PATCH] pamhyr: Put debug info as logger debug handler.

---
 src/init.py   | 6 +++---
 src/pamhyr.py | 3 ++-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/init.py b/src/init.py
index 99f98d93..a6eb3aa4 100644
--- a/src/init.py
+++ b/src/init.py
@@ -86,11 +86,11 @@ def legal_info():
 
 def debug_info():
     py_version = sys.version.split("\n")[0]
-    logger.info(f"python: {py_version}")
+    logger.debug(f"python: {py_version}")
 
     info = QLibraryInfo
-    logger.info(f"{info.location(QLibraryInfo.PrefixPath)}")
-    logger.info(f"{info.location(QLibraryInfo.LibraryExecutablesPath)}")
+    logger.debug(f"Qt PrefixPath: {info.location(QLibraryInfo.PrefixPath)}")
+    logger.debug(f"Qt LibExecPath: {info.location(QLibraryInfo.LibraryExecutablesPath)}")
 
 def setup_lang(app, conf:Config):
     "Return QTranslator configured for current language"
diff --git a/src/pamhyr.py b/src/pamhyr.py
index cdaa5360..4226efd6 100755
--- a/src/pamhyr.py
+++ b/src/pamhyr.py
@@ -62,6 +62,8 @@ def gui(app:QApplication, conf:Config):
     application = ApplicationWindow(conf=conf)
     application.show()
 
+    debug_info()
+
     return app.exec_()
 
 def main():
@@ -72,7 +74,6 @@ def main():
     app.installTranslator(tr)
 
     legal_info()
-    debug_info()
 
     if len(sys.argv) > 1:
         # Run a script
-- 
GitLab