I'm writing a Spring Boot app and need the flexibility of controlling my logback configuration using Groovy. In Spring Boot all I have to do is create src/main/resources/logback.groovy and it is automatically used for configuration.
What I would like to do though is start with Spring Boot's default logback configuration, and just override or modify settings as needed.
If I were using logback.xml instead of logback.groovy I could do something like the following.
<?xml version="1.0" encoding="UTF-8"?>
<logger name="org.springframework.web" level="DEBUG"/>
There's an online tool that translates given
logback.xml file to equivalent
logback.groovy. In your case it resulted in:
// // Built on Thu Jul 16 09:35:34 CEST 2015 by logback-translator // For more information on configuration files in Groovy // please see http://logback.qos.ch/manual/groovy.html // For assistance related to this tool or configuration files // in general, please contact the logback user mailing list at // http://qos.ch/mailman/listinfo/logback-user // For professional support please see // http://www.qos.ch/shop/products/professionalSupport import static ch.qos.logback.classic.Level.DEBUG logger("org.springframework.web", DEBUG)
When it comes to
<include> it's not supported for groovy configurations.