def _setFilePathOnLogger(logger, path):
    _removeHandlersFromLogger(logger, logging.handlers.TimedRotatingFileHandler)
    handler = logging.handlers.TimedRotatingFileHandler(path, 'midnight', backupCount=10)
    handler.setFormatter(logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s'))
    logger.addHandler(handler)
def _setFilePathOnLogger(logger, path):
    _removeHandlersFromLogger(logger, logging.handlers.TimedRotatingFileHandler)
    handler = logging.handlers.TimedRotatingFileHandler(path, 'midnight', backupCount=10)
    handler.setFormatter(logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s'))
    logger.addHandler(handler)