affect-screening / anxiety_app /logging_config.py
parth036's picture
Upload folder using huggingface_hub
8882192 verified
Raw
History Blame Contribute Delete
428 Bytes
"""Logging setup shared across the app."""
import logging
_CONFIGURED = False
def configure_logging(level=logging.INFO):
"""Configure root logging once with a concise, timestamped format."""
global _CONFIGURED
if _CONFIGURED:
return
logging.basicConfig(
level=level,
format="%(asctime)s %(levelname)-7s %(name)s | %(message)s",
datefmt="%H:%M:%S",
)
_CONFIGURED = True