"""Test log_central.""" import logging import pytest from switchboard_consumer.connectors.log_central import ELKCentralAdapter @pytest.fixture def logger(): """Create loggers for the test.""" logger = logging.getLogger('test') ows_logger = logging.getLogger('ows_logger') return ELKCentralAdapter(logger, {}, ows_logger) def test_log_with_dict(logger): """Test logging with a dict.""" message = { 'a_key': 'a_value' } logger.warning(message) def test_log_with_string(logger): """Test logging with a string.""" message = 'a really good string' logger.warning(message)