Skip to content

Commit cdf6eb9

Browse files
committed
Reduced warn log entry without stacktrace for startup exceptions
Issue: SPR-13663
1 parent 5d9d88c commit cdf6eb9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: spring-context/src/main/java/org/springframework/context/support/AbstractApplicationContext.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,10 @@ public void refresh() throws BeansException, IllegalStateException {
541541
}
542542

543543
catch (BeansException ex) {
544-
logger.warn("Exception encountered during context initialization - cancelling refresh attempt", ex);
544+
if (logger.isWarnEnabled()) {
545+
logger.warn("Exception encountered during context initialization - " +
546+
"cancelling refresh attempt: " + ex);
547+
}
545548

546549
// Destroy already created singletons to avoid dangling resources.
547550
destroyBeans();

0 commit comments

Comments
 (0)