manager.tinyMediaManager.3.0.5.source-code.logback.xml Maven / Gradle / Ivy
<?xml version="1.0" encoding="UTF-8"?> <configuration> <statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener"/> <!-- https://logback.qos.ch/manual/appenders.html --> <!-- we log to three different locations: 1) the console (for CMD and IDE) -> INFO in CMD and DEBUG in IDE 2) a log file (INFO) 3) a memory appender for providing more logs in case of bug reporting (TRACE) --> <property name="logfolder" value="logs"/> <if condition='isDefined("tmm.logfolder")'> <then> <property name="logfolder" value="${tmm.logfolder}"/> </then> </if> <if condition='isDefined("tmm.contentfolder")'> <then> <property name="logfolder" value="${tmm.contentfolder}/logs"/> </then> </if> <!-- console appender; mainly for CMD and for the IDE --> <!-- in the CMD the log level is reduced by the JVM arg -Dtmm.consoleloglevel=INFO --> <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>DEBUG</level> </filter> <encoder> <pattern>%d{ISO8601} %-5level [%thread] %logger{40}:%L - %msg%n</pattern> </encoder> </appender> <!-- file appender - INFO and above --> <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>INFO</level> </filter> <file>${logfolder}/tmm.log</file> <append>true</append> <encoder> <pattern>%d{ISO8601} %-5level [%thread] %logger{40}:%L - %msg%n</pattern> </encoder> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <fileNamePattern>${logfolder}/tmm.%d.%i.log.gz</fileNamePattern> <maxFileSize>10MB</maxFileSize> <maxHistory>7</maxHistory> <totalSizeCap>1GB</totalSizeCap> <cleanHistoryOnStart>true</cleanHistoryOnStart> </rollingPolicy> </appender> <appender name="ASYNC500" class="ch.qos.logback.classic.AsyncAppender"> <queueSize>5000</queueSize> <discardingThreshold>0</discardingThreshold> <appender-ref ref="FILE"/> </appender> <!-- memory appender for collection of logs - TRACE and above --> <appender name="INMEMORY" class="org.tinymediamanager.InMemoryAppender"> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>TRACE</level> </filter> <encoder> <pattern>%d{ISO8601} %-5level [%thread] %logger{40}:%L - %msg%n</pattern> </encoder> </appender> <!-- default settings --> <logger name="org.tinymediamanager" level="TRACE"/> <!-- appender activation --> <root> <appender-ref ref="CONSOLE"/> <appender-ref ref="ASYNC500"/> <appender-ref ref="INMEMORY"/> </root> </configuration>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy