logger.logback_ts_clients.xml Maven / Gradle / Ivy
<?xml version="1.0" encoding="UTF-8"?> <!-- 只需配置好 log.dir 属性--> <configuration debug="false"> <property name="log.dir" value="${metricspath}/metrics-log" /> <property name="log.filename" value="${metricsfilename}" /> <appender name="StatisticAppender" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>${log.dir}/${log.filename}.log</file> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>INFO</level> </filter> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <fileNamePattern>${log.dir}/${log.filename}-%d{yyyy-MM-dd}.log </fileNamePattern> <maxHistory>30</maxHistory> </rollingPolicy> <encoder charset="UTF-8"> <!--<pattern>%d [%thread] %-5p [%c] [%F:%L] - %msg%n</pattern>--> <pattern>%msg%n</pattern> </encoder> </appender> <logger name="net.wicp.tams.common.metrics" additivity="false"> <level value="INFO" /> <appender-ref ref="StatisticAppender" /> </logger> </configuration>