def _create_timed_rotating_logger(name):
    logger = logging.getLogger(name)
    logger.setLevel(logging.DEBUG)
    handler = TimedRotatingFileHandlerWithCurrentTimestamp(
        default_logger_location % name, when='midnight', interval=1,
        backupCount=6)
    formatter = logging.Formatter(
        '%(asctime)s - %(name)s - %(levelname)s - %(message)s')
    handler.setFormatter(formatter)
    logger.addHandler(handler)
    logger.handlers[0].doRollover()
    return logger
dataset/ETHPy150Open openstack/stacktach/stacktach/stacklog.py/_create_timed_rotating_logger/original