def setup_logger(logger, fname, stream=True, mode=logging.ERROR):
    path = os.path.join(ETSConfig.application_home, fname)
    handler = LogFileHandler(path)
    logger.addHandler(handler)
    if stream:
        s = logging.StreamHandler()
        s.setFormatter(FORMATTER)
        s.setLevel(mode)
        logger.addHandler(s)
    logger.info("*"*80)
    logger.info("logfile is: '%s'", os.path.abspath(path))
    logger.info("*"*80)
Returns average BPM (possibly of a playing song)
dataset/ETHPy150Open enthought/mayavi/examples/tvtk/plugins/test.py/setup_logger--crossover with--dataset/ETHPy150Open beetbox/beets/beetsplug/bpm.py/bpm