def getLogger(
    name: str,
    level: str = DEFAULT_LOG_LEVEL,
    filepath: str = DEFAULT_LOG_FILEPATH,
    override: bool = False,
    local_tz: bool = False,
) -> logging.Logger:
    '''
    Creates a logger with the given name, level, and handlers.
    - disable the logger by setting the level to logging.CRITICAL
    - the default log level is 'WARNING'
    - the default log file is './durdraw.log'

    This logger will only create an output file if there is a call to write a log message that matches the log level.
    '''
    global CURRENT_LOG_LEVEL
    global CURRENT_LOG_FILEPATH
    global LOGGER_INITIALISED
    global CURRENT_LOG_TZ

    if not LOGGER_INITIALISED or override:
        # create a root logger
        LOGGER_INITIALISED = True
        CURRENT_LOG_LEVEL = level
        CURRENT_LOG_FILEPATH = filepath
        if local_tz:
            CURRENT_LOG_TZ = datetime.now().astimezone().tzinfo
        else:
            CURRENT_LOG_TZ = timezone.utc

    return _getLogger(
        name,
        level=LOG_LEVEL[CURRENT_LOG_LEVEL],
        handlers=[logging.FileHandler(CURRENT_LOG_FILEPATH, mode='a', delay=True)],
        local_tz=CURRENT_LOG_TZ,
    )

    Creates a logger with the given name, level, and handlers.
    - disable the logger by setting the level to logging.CRITICAL
    - the default log level is 'WARNING'
    - the default log file is './durdraw.log'

    This logger will only create an output file if there is a call to write a log message that matches the log level.
    
durdraw/log.py