Skip to content

Commit e539e0d

Browse files
Konstantin PavlovKonstantin Pavlov
authored andcommitted
Use placeholders in logger.error to prevent string concatenation.
Replaced string concatenation with a placeholder in the logger.error call to improve performance and maintain consistency with logging best practices. This helps avoid unnecessary overhead when logging is disabled.
1 parent 5712e6c commit e539e0d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-ai-core/src/main/java/org/springframework/ai/converter/BeanOutputConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ private void generateSchema() {
145145
this.jsonSchema = objectWriter.writeValueAsString(jsonNode);
146146
}
147147
catch (JsonProcessingException e) {
148-
logger.error("Could not pretty print json schema for jsonNode: " + jsonNode);
148+
logger.error("Could not pretty print json schema for jsonNode: {}", jsonNode);
149149
throw new RuntimeException("Could not pretty print json schema for " + this.type, e);
150150
}
151151
}

0 commit comments

Comments
 (0)