diff --git a/mlserver/settings.py b/mlserver/settings.py index 430a3033e..4d631c5a8 100644 --- a/mlserver/settings.py +++ b/mlserver/settings.py @@ -222,7 +222,7 @@ class Config: # Logging settings use_structured_logging: bool = False - """Use JSON-formatted structured logging instead of default human-readable format.""" + """Use JSON-formatted structured logging instead of default format.""" logging_settings: Optional[Union[str, Dict]] = None """Path to logging config file or dictionary configuration.""" diff --git a/tests/test_logging.py b/tests/test_logging.py index fcf7c7ed7..26d41980d 100644 --- a/tests/test_logging.py +++ b/tests/test_logging.py @@ -1,4 +1,6 @@ import pytest +import json + from mlserver import ModelSettings from mlserver.context import model_context @@ -108,6 +110,7 @@ def test_model_logging_formatter_structured( logger.info("Inside model context") logger.info("After model context") + _ = [json.loads(lr) for lr in caplog.text.strip().split("\n")] log_records = caplog.get_records("call") assert len(log_records) == 3