brokentest / modules /logger_util.py
jhj0517
Add logger
5682a2c
raw
history blame
274 Bytes
import logging
from typing import Optional
def get_logger(name: Optional[str] = None, level: str = "INFO") -> logging.Logger:
if name is None:
name = "sam2-playground"
logger = logging.getLogger(name)
logger.setLevel(level.upper())
return logger