English
Antoine1091's picture
Upload folder using huggingface_hub
ede298f verified
raw
history blame contribute delete
340 Bytes
import logging
from pathlib import Path
def init_logging(log_file: Path):
"""
Initialize logging
"""
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s [%(levelname)s] %(message)s",
handlers=[
logging.FileHandler(log_file),
logging.StreamHandler()
]
)