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 48a9e0d  Fix audit logging when the storage interface is used in tasks
48a9e0d is described below

commit 48a9e0d7ec8f74d07d4a08b37f34d0fb8cfa7430
Author: Sean B. Palmer <[email protected]>
AuthorDate: Fri Jan 23 19:28:11 2026 +0000

    Fix audit logging when the storage interface is used in tasks
---
 atr/worker.py | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/atr/worker.py b/atr/worker.py
index 850882f..b7c9f5f 100644
--- a/atr/worker.py
+++ b/atr/worker.py
@@ -141,9 +141,13 @@ async def _execute_check_task(
 def _setup_logging() -> None:
     import logging
 
+    import atr.config as config
     import atr.loggers as loggers
 
+    conf = config.get()
+
     os.makedirs("logs", exist_ok=True)
+    os.makedirs(os.path.dirname(conf.STORAGE_AUDIT_LOG_FILE), exist_ok=True)
 
     shared_processors = loggers.shared_processors()
     output_handler = logging.FileHandler("logs/atr-worker.log")
@@ -153,6 +157,13 @@ def _setup_logging() -> None:
 
     loggers.configure_structlog(shared_processors)
 
+    # Audit logger
+    loggers.setup_dedicated_file_logger(
+        "atr.storage.audit",
+        conf.STORAGE_AUDIT_LOG_FILE,
+        shared_processors,
+    )
+
 
 async def _task_next_claim() -> tuple[int, str, list[str] | dict[str, Any], 
str] | None:
     """


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to