def logger(name):
    """
    Args:
        name (str): Logger name

    Returns:
        logging.Logger
    """

    # Make sure the path always points to the correct directory
    config_path = os.path.dirname(os.path.realpath(__file__)) + "/../logging_conf.json"

    if not isfile(config_path):  # called from file (deletefb.py)
        os.chdir("..")
    with open(config_path, "r", encoding="utf-8") as config_file:
        config = json.load(config_file)
        logging.config.dictConfig(config["logging"])
    return logging.getLogger(name)

    Args:
        name (str): Logger name

    Returns:
        logging.Logger
    
deletefb/tools/common.py