You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tooling.apache.org by sb...@apache.org on 2025/10/26 20:33:08 UTC

(tooling-trusted-releases) branch main updated: Fix a problem with loading the performance logger

This is an automated email from the ASF dual-hosted git repository.

sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git


The following commit(s) were added to refs/heads/main by this push:
     new 55e52b5  Fix a problem with loading the performance logger
55e52b5 is described below

commit 55e52b561d3800f7448d1207e4241a701099fe55
Author: Sean B. Palmer <se...@miscoranda.com>
AuthorDate: Sun Oct 26 20:32:51 2025 +0000

    Fix a problem with loading the performance logger
---
 atr/log.py    | 10 ++++++++--
 atr/server.py |  1 +
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/atr/log.py b/atr/log.py
index a506543..d225249 100644
--- a/atr/log.py
+++ b/atr/log.py
@@ -147,8 +147,14 @@ def _performance_logger() -> logging.Logger:
     return performance
 
 
-PERFORMANCE: Final = _performance_logger()
+PERFORMANCE: logging.Logger | None = None
 
 
 def performance(msg: str, *args: Any, **kwargs: Any) -> None:
-    PERFORMANCE.info(msg, *args, **kwargs)
+    if PERFORMANCE is not None:
+        PERFORMANCE.info(msg, *args, **kwargs)
+
+
+def init_performance() -> None:
+    global PERFORMANCE
+    PERFORMANCE = _performance_logger()
diff --git a/atr/server.py b/atr/server.py
index c83a153..ae00960 100644
--- a/atr/server.py
+++ b/atr/server.py
@@ -288,6 +288,7 @@ def create_app(app_config: type[config.AppConfig]) -> base.QuartApp:
     """Create and configure the application."""
     config_mode = config.get_mode()
     app_dirs_setup(app_config)
+    log.init_performance()
     app = app_create_base(app_config)
 
     app_setup_api_docs(app)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org