import logging


def get_logger(name):
    """
    Get a child logger of the default logger
    :param name: expects an arbitrary name or list of names to form into heirarchy
    :return:
    """

    if isinstance(name, str):
        child_logger_name = name
    else:
        child_logger_name = ".".join(name)

    if len(child_logger_name) < 1:
        raise ValueError("No logger name given.")

    return logging.getLogger(f"pynonymizer.{child_logger_name}")