structured logging around key workflows and docs for operational readiness
This commit is contained in:
parent
2902e362df
commit
99bb851ca8
8 changed files with 288 additions and 5 deletions
15
src/repo_registry/core/logging.py
Normal file
15
src/repo_registry/core/logging.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import logging
|
||||
from typing import Any
|
||||
|
||||
|
||||
LOGGER_NAME = "repo_registry.operations"
|
||||
|
||||
|
||||
def log_operation(event: str, **fields: Any) -> None:
|
||||
payload = {"event": event, **fields}
|
||||
logging.getLogger(LOGGER_NAME).info(
|
||||
json.dumps(payload, sort_keys=True, default=str)
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue