Created
June 15, 2016 14:02
-
-
Save arjones/bc2134e589a3088c585d861182c2b00e to your computer and use it in GitHub Desktop.
Logback sample configuration with RollingFileAppender
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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<!--Daily rolling file appender --> | |
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> | |
<File>logs/application.log</File> | |
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | |
<FileNamePattern>logs/application.%d{yyyy-MM-dd}.log.gz</FileNamePattern> | |
<maxHistory>30</maxHistory> | |
</rollingPolicy> | |
<layout class="ch.qos.logback.classic.PatternLayout"> | |
<Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{35} - %msg%n</Pattern> | |
</layout> | |
</appender> | |
<logger name="com.smx"><level value="INFO"/></logger> | |
<logger name="edu.uci.ics.crawler4j"><level value="WARN"/></logger> | |
<logger name="org.apache.http.impl.conn.PoolingClientConnectionManager"><level value="WARN" /></logger> | |
<root> | |
<level value="INFO"/> | |
<appender-ref ref="FILE"/> | |
</root> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment