Spaces:
Runtime error
Runtime error
""" | |
Logging helper module | |
""" | |
import logging.config | |
import yaml | |
with open("elise/src/configs/logging_config.yaml", "r", encoding="utf-8") as f: | |
config = yaml.safe_load(f.read()) | |
logging.config.dictConfig(config) | |
logging.captureWarnings(True) | |
def get_logger(name: str): | |
"""Logs a message | |
Parameters: | |
name(str): name of logger | |
""" | |
logger = logging.getLogger(name) | |
return logger | |