diff --git a/ld_openfeature/impl/context_converter.py b/ld_openfeature/impl/context_converter.py index 341c0c6..f359885 100644 --- a/ld_openfeature/impl/context_converter.py +++ b/ld_openfeature/impl/context_converter.py @@ -52,7 +52,7 @@ def to_ld_context(self, context: EvaluationContext) -> Context: return self.__build_multi_context(context) if kind is not None and not isinstance(kind, str): - logger.warning("'kind' was set to a non-string value; defaulting to user") + logger.error("'kind' was set to a non-string value; defaulting to user") kind = 'user' targeting_key = context.targeting_key diff --git a/tests/test_provider.py b/tests/test_provider.py index 0fe2e35..928112b 100644 --- a/tests/test_provider.py +++ b/tests/test_provider.py @@ -237,6 +237,7 @@ def test_logger_changes_should_cascade_to_evaluation_converter(provider: LaunchD assert len(caplog.records) == 1 assert caplog.records[0].message == "'kind' was set to a non-string value; defaulting to user" + assert caplog.records[0].levelname == 'ERROR' def test_track_without_context_does_not_send_an_event(provider: LaunchDarklyProvider):