Skip to content

Commit 18b39cb

Browse files
committed
Reduce general runtime exception logging to debug.
Issue #2074.
1 parent 461e959 commit 18b39cb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/RepositoryRestExceptionHandler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import org.springframework.context.MessageSource;
2323
import org.springframework.context.support.MessageSourceAccessor;
2424
import org.springframework.core.convert.ConversionFailedException;
25+
import org.springframework.core.log.LogFormatUtils;
2526
import org.springframework.dao.DataIntegrityViolationException;
2627
import org.springframework.dao.OptimisticLockingFailureException;
2728
import org.springframework.data.rest.core.RepositoryConstraintViolationException;
@@ -165,7 +166,7 @@ private static ResponseEntity<ExceptionMessage> errorResponse(HttpStatus status,
165166
if (exception != null) {
166167

167168
String message = exception.getMessage();
168-
LOG.error(message, exception);
169+
LOG.debug(LogFormatUtils.formatValue(message, -1, true), exception);
169170

170171
if (StringUtils.hasText(message)) {
171172
return response(status, headers, new ExceptionMessage(exception));

0 commit comments

Comments
 (0)