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() | |
] | |
) | |