import functools


def logger(verbose: bool):
    """ Produces a logger function which only prints if the initial verbose value
    was true

    :param verbose:
    :return: callable function which takes the arguments of print
    """
    @functools.wraps(print)
    def printer(*args, **kwargs) -> None:
        if verbose:
            print(*args, **kwargs)
    return printer