I want to use logback smtp appender in my spring boot application, but somehow spring boot default logback 1.1.7 dependency does not work well with SMTP appenders. How can I downgrade spring boot provided logback library from 1.1.7 to 1.1.6? I am using gradle for build management.
UpdateIt worked after i tried Andy's Answer, so now my build.gradle file looks like this
buildscript {
...
ext['logback.version'] = '1.1.6'
...
}
By default, Spring Boot picks up the native configuration from its default location for the system (such as classpath:logback. xml for Logback), but you can set the location of the config file by using the "logging. config" property.
If you name your configuration file logback-spring. xml , rather than logback. xml , you can use <springProperty> to access properties from Spring's environment including those configured in application. properties .
In a Spring Boot application, you can put the Logback. xml file in the resources folder. If your Logback. xml file is outside the classpath, you need to point to its location using the Logback.
Your best bet is to override the logback.version
property. This will ensure that you get the desired version of Logback everywhere:
ext['logback.version'] = '1.1.6'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With