grid2op-openenv / server /logging_utils.py
Sidharth1743's picture
Hackathon polishing
689c71b
raw
history blame contribute delete
390 Bytes
from __future__ import annotations
import logging
def configure_logging(level: int = logging.INFO) -> None:
root_logger = logging.getLogger()
if root_logger.handlers:
root_logger.setLevel(level)
return
logging.basicConfig(
level=level,
format="%(asctime)s | %(levelname)s | %(name)s | %(message)s",
datefmt="%Y-%m-%d %H:%M:%S",
)