import logging from pathlib import Path def setup_logging(log_path: Path) -> logging.Logger: log_path.parent.mkdir(parents=True, exist_ok=True) logging.basicConfig( filename=str(log_path), level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s" ) logger = logging.getLogger("bn_strategy") logger.setLevel(logging.INFO) return logger