def test_import_ess_loggers(self, obj): config = Config(graylog='//localhost:12201', kafka_logger='//localhost:9092/log_topic', mongo_logger='//localhost:27017', setup_package='nicos_ess') handlers = get_facility_log_handlers(config) assert [ handler for handler in handlers if isinstance(handler, KafkaLoggingHandler) ] assert [ handler for handler in handlers if isinstance(handler, ESSGELFTCPHandler) ]
def test_import_ess_graylog(self): handlers = get_facility_log_handlers( Config(graylog='//localhost:12201', setup_package='nicos_ess')) assert handlers assert isinstance(handlers[0], self.logging_type)
def test_no_loggers_created_if_options_is_empty(self): config = Config(setup_package='nicos_ess') assert get_facility_log_handlers(config) == []
def test_import_demo_loggers(self): config = Config(graylog='//localhost:12201', kafka_logger='//localhost:9092/log_topic', mongo_logger='//localhost:27017', setup_package='nicos_demo') assert get_facility_log_handlers(config) == []
def test_import_sinq_mongo(self): handlers = get_facility_log_handlers( Config(mongo_logger='//localhost:27017', setup_package='nicos_sinq')) assert handlers assert isinstance(handlers[0], self.logger_type)
def test_import_ess_kafka_logger(self, obj): handlers = get_facility_log_handlers( Config(kafka_logger='//localhost:9092/log_topic', setup_package='nicos_ess')) assert handlers assert isinstance(handlers[0], self.logger_type)