Created
February 24, 2013 17:01
-
-
Save vazexqi/5024574 to your computer and use it in GitHub Desktop.
sfl4j logging with Groovy using Gradle to manage dependencies (logback.xml)
See http://vazexqi.github.com/posts/2013/02/24/groovy-sfl4j.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration> | |
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | |
<encoder> | |
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> | |
</encoder> | |
</appender> | |
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> | |
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | |
<!-- Daily rollover --> | |
<fileNamePattern>log/MyExample.%d{yyyy-MM-dd}.log</fileNamePattern> | |
<!-- Keep 7 days' worth of history --> | |
<maxHistory>7</maxHistory> | |
</rollingPolicy> | |
<encoder> | |
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> | |
</encoder> | |
</appender> | |
<!-- Configure so that it outputs to both console and log file --> | |
<root level="DEBUG"> | |
<appender-ref ref="FILE" /> | |
<appender-ref ref="STDOUT" /> | |
</root> | |
</configuration> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment