.web.0.1.source-code.logback.xml Maven / Gradle / Ivy
<configuration> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{0} %M - %msg%n </pattern> </encoder> </appender> <appender name="FILE" class="ch.qos.logback.core.FileAppender"> <file>${logFileDir:-logs}/${logFileName:-web}.log</file> <append>false</append> <!-- set immediateFlush to false for much higher logging throughput --> <immediateFlush>false</immediateFlush> <!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --> <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{0} %M - %msg%n </pattern> </encoder> </appender> <appender name="LOG" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>logs/logFile.log</file> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <!-- daily rollover - move OUT of the log folder...thats actually what we want to save ram --> <fileNamePattern>logFile.%d{yyyy-MM-dd}.log</fileNamePattern> <!-- keep 30 days' worth of history capped at 30MB total size --> <maxHistory>30</maxHistory> <totalSizeCap>30MB</totalSizeCap> </rollingPolicy> <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{0} %M - %msg%n </pattern> </encoder> <append>false</append> </appender> <root level="INFO"> <appender-ref ref="STDOUT"/> <appender-ref ref="FILE"/> </root> <logger name="io.moquette.broker.PostOffice" level="WARN" additivity="false"> <appender-ref ref="STDOUT"/> <appender-ref ref="FILE"/> </logger> </configuration>