import logging from config import BASE_DIR log_dir = BASE_DIR / "logs" log_dir.mkdir(exist_ok=True) logging.basicConfig( level=logging.INFO, format="%(asctime)s [%(levelname)s] %(name)s: %(message)s", handlers=[ logging.FileHandler(log_dir / "app.log"), logging.StreamHandler() ] ) def get_logger(name: str): return logging.getLogger(name)