spincast-demos-better.1.5.1.source-code.logback.xml Maven / Gradle / Ivy
<?xml version="1.0" encoding="UTF-8"?> <configuration> <appender name="stdout" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <charset>UTF-8</charset> <pattern>%d{yyyy-MM-dd HH:mm:ss} [%level] %msg ~ %caller{1}</pattern> </encoder> </appender> <appender name="file" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>logs/application.log</file> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <!-- daily rollover --> <fileNamePattern>logs/application.%d{yyyy-MM-dd}.log</fileNamePattern> <!-- keep 30 days' worth of history --> <maxHistory>30</maxHistory> </rollingPolicy> <encoder> <pattern>%d{yyyy-MM-dd HH:mm:ss, UTC} [%level] ~ %msg ~ [%thread] - %caller{1}</pattern> <charset>UTF-8</charset> </encoder> </appender> <!--=================================== Appender Level, default ====================================--> <root level="info"> <appender-ref ref="stdout"/> <appender-ref ref="file"/> </root> <!--=================================== Appender Level, for the application ====================================--> <logger name="org.spincast" level="debug" additivity="false"> <appender-ref ref="stdout" /> <appender-ref ref="file"/> </logger> </configuration>