def configure_logging(level, format, filename):

    logging.root.handlers = []

    handler = logging.StreamHandler()
    if filename:
        handler = logging.handlers.WatchedFileHandler(filename)

    handler.setFormatter(logging.Formatter(format))

    logging.root.addHandler(handler)

    if level is not None:
        logging.root.setLevel(level)

    return handler.stream.fileno()
Run the comparison on the given data file
dataset/ETHPy150Open thread/django-lightweight-queue/django_lightweight_queue/utils.py/configure_logging--crossover with--dataset/ETHPy150Open slinderman/pyhawkes/experiments/chalearn_small_comparison.py/run_comparison