'In spring-boot 2.6.2 Could not initialize Logback logging from classpath:logback-spring.groovy

I migrated my spring boot app for spring-boot 2.5.6 to spring-boot 2.6.2, but since then the start up tells

java.lang.IllegalStateException: Could not initialize Logback logging from classpath:logback-spring.groovyCaused by: ch.qos.logback.core.LogbackException:

Caused by: ch.qos.logback.core.LogbackException:Unexpected filename extension of file [file:/xyz/out/production/resources/logback-spring.groovy]. Should be either .groovy or .xml

Can someone help if you have a solution? Thanks



Solution 1:[1]

Logback 1.2.9 dropped the support for Groovy.

You can either migrate your logback.groovy to logback.xml or downgrade the logback version to 1.2.7 (logback.version=1.2.7) and see if they’ll come around and support Groovy again (which they might).

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 brianjohnsen