Change log level from DEBUG to INFO for ObservationHandlers
The features are disabled by default and users need to explicitly enable them. Probably it makes more sense to log on INFO level so that users don't need to change the log level if they use the default behavior of Spring Boot. See gh-3003 See gh-3127
This commit is contained in:
committed by
Christian Tzolov
parent
5d6bbd9368
commit
cd3fc2f816
@@ -40,7 +40,7 @@ public class VectorStoreQueryResponseObservationHandler implements ObservationHa
|
||||
|
||||
@Override
|
||||
public void onStop(VectorStoreObservationContext context) {
|
||||
logger.debug("Vector Store Query Response:\n{}", ObservabilityHelper.concatenateStrings(documents(context)));
|
||||
logger.info("Vector Store Query Response:\n{}", ObservabilityHelper.concatenateStrings(documents(context)));
|
||||
}
|
||||
|
||||
private List<String> documents(VectorStoreObservationContext context) {
|
||||
|
||||
@@ -57,7 +57,7 @@ class VectorStoreQueryResponseObservationHandlerTests {
|
||||
var context = VectorStoreObservationContext.builder("db", VectorStoreObservationContext.Operation.ADD).build();
|
||||
this.observationHandler.onStop(context);
|
||||
assertThat(output).contains("""
|
||||
Vector Store Query Response:
|
||||
INFO o.s.a.v.o.VectorStoreQueryResponseObservationHandler -- Vector Store Query Response:
|
||||
[]
|
||||
""");
|
||||
}
|
||||
@@ -68,7 +68,7 @@ class VectorStoreQueryResponseObservationHandlerTests {
|
||||
context.setQueryResponse(List.of(new Document("doc1"), new Document("doc2")));
|
||||
this.observationHandler.onStop(context);
|
||||
assertThat(output).contains("""
|
||||
Vector Store Query Response:
|
||||
INFO o.s.a.v.o.VectorStoreQueryResponseObservationHandler -- Vector Store Query Response:
|
||||
["doc1", "doc2"]
|
||||
""");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user