dataset / app /logging_setup.py
parthpatel01's picture
Add files using upload-large-folder tool
45a77a4 verified
raw
history blame contribute delete
390 Bytes
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