def main():
config = options()
logging.basicConfig(level=logging.getLevelName(config.log_level),
format=config.log_format)
db_connection = get_connection(config.log_service.db.servers,
config.log_service.db.replica_name)
collection = get_collection(config.log_service.db.name,
config.log_service.db.collection,
db_connection)
agent_log_service = AgentLogService(config.log_service.bind_address,
collection)
LOG.info('Starting logging service on {}'.format(
config.log_service.bind_address))
agent_log_service.start()
评论列表
文章目录