English
DeepChoice / image_baseline /utils /logging_utils.py
antoine.carreaud67
Clean and reorganize repository for public release
4a48212
Raw
History Blame Contribute Delete
377 Bytes
import logging
def init_logging(log_path):
log_path.parent.mkdir(parents=True, exist_ok=True)
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s - %(levelname)s - %(message)s",
handlers=[
logging.FileHandler(log_path, mode="w", encoding="utf-8"),
logging.StreamHandler(),
],
force=True,
)