import logging


def get_logger_name(mylogger) -> str:
    """Find the name of the logger provided.
    This is useful when configuring logging.
    """
    ld = logging.Logger.manager.loggerDict
    # ld = logman.loggerDict
    # print("loggernames {}".format(ld.keys()))
    for k, v in ld.items():
        if v == mylogger:
            return k
    return 'not found'