File size: 390 Bytes
45a77a4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
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
|