peijun1's picture
Deploy AI Studio Proxy API to Hugging Face Spaces
a5784e9
Raw
History Blame Contribute Delete
553 Bytes
"""
Logging Context Variables
"""
from contextvars import ContextVar
# =============================================================================
# Context Variables (Thread-safe request tracking)
# =============================================================================
# Request ID for the current context (e.g., 'akvdate')
request_id_var: ContextVar[str] = ContextVar("request_id", default=" ")
# Source identifier for the current context (e.g., 'SERVER', 'PROXY')
source_var: ContextVar[str] = ContextVar("source", default="SYS")