from wurker.settings import conf
from log9er import Logger


def init_logger(name:str='', log:str='', level:int|str="", debug:bool=False):
    """Will return the same logger if they have the same name."""

    name = name or "Wurker"
    log = log or conf.log
    level = level or conf.loglevel
    debug = debug or conf.debug

    return Logger(
        name = name,
        log = log,
        level = level,
        debug = debug
    )
