Constrained-Financial-RAG / rag /logging_utils.py
ZedLow's picture
Update rag/logging_utils.py
28d7a26 verified
import logging
import sys
_CONFIGURED = False
def get_logger(name: str):
global _CONFIGURED
if not _CONFIGURED:
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s | %(levelname)s | %(name)s | %(message)s",
handlers=[logging.StreamHandler(sys.stdout)],
)
_CONFIGURED = True
return logging.getLogger(name)