Last active
April 15, 2017 05:42
-
-
Save satendrakumar/d51fe8b854b86f2041f2ea4fda765b45 to your computer and use it in GitHub Desktop.
logback xml with rolling appender
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="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> | |
<encoder> | |
<pattern>%highlight([%level]) - [%thread] - [%date] - [%logger] %msg%n</pattern> | |
</encoder> | |
</appender> | |
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> | |
<prudent>true</prudent> | |
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | |
<fileNamePattern>logs/etl-%d{yyyy-MM-dd}.log</fileNamePattern> | |
<maxHistory>30</maxHistory> | |
</rollingPolicy> | |
<append>true</append> | |
<encoder> | |
<pattern>%highlight([%level]) - [%date] - [%logger] %msg%n</pattern> | |
</encoder> | |
</appender> | |
<logger name="com.techmonad" level="info"> | |
<appender-ref ref="CONSOLE"/> | |
<appender-ref ref="FILE"/> | |
</logger> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment