123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- <?xml version="1.0" encoding="UTF-8"?>
- <configuration>
- <!-- log base path -->
- <springProperty scope="context" name="logPath" source="logging.basePath"/>
- <property name="LOG_HOME" value="${logPath}"/>
- <property name="LOG_PATTERN" value="[%d{yyyy-MM-dd HH:mm:ss.SSS}] %highlight(%level) [%thread] %highlight(%logger{100}) - %msg%n"/>
- <appender name="LEVEL_GE_INFO" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <append>true</append>
- <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
- <level>INFO</level>
- </filter>
- <file>${LOG_HOME}/log-ge-info.log</file>
- <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
- <fileNamePattern>${LOG_HOME}/log-ge-info-%i.log</fileNamePattern>
- <minIndex>1</minIndex>
- <maxIndex>10</maxIndex>
- </rollingPolicy>
- <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
- <maxFileSize>50MB</maxFileSize>
- </triggeringPolicy>
- <encoder charset="UTF-8">
- <pattern>${LOG_PATTERN}</pattern>
- <charset>UTF-8</charset>
- </encoder>
- </appender>
- <appender name="LEVEL_GE_WARN" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <append>true</append>
- <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
- <level>WARN</level>
- </filter>
- <file>${LOG_HOME}/log-ge-warn.log</file>
- <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
- <fileNamePattern>${LOG_HOME}/log-ge-warn-%i.log</fileNamePattern>
- <minIndex>1</minIndex>
- <maxIndex>10</maxIndex>
- </rollingPolicy>
- <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
- <maxFileSize>100MB</maxFileSize>
- </triggeringPolicy>
- <encoder charset="UTF-8">
- <pattern>${LOG_PATTERN}</pattern>
- <charset>UTF-8</charset>
- </encoder>
- </appender>
- <appender name="LEVEL_GE_DEBUG" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <append>true</append>
- <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
- <level>DEBUG</level>
- </filter>
- <file>${LOG_HOME}/log-ge-debug.log</file>
- <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
- <fileNamePattern>${LOG_HOME}/log-ge-debug-%i.log</fileNamePattern>
- <minIndex>1</minIndex>
- <maxIndex>10</maxIndex>
- </rollingPolicy>
- <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
- <maxFileSize>100MB</maxFileSize>
- </triggeringPolicy>
- <encoder charset="UTF-8">
- <pattern>${LOG_PATTERN}</pattern>
- <charset>UTF-8</charset>
- </encoder>
- </appender>
- <appender name="LEVEL_GE_ERROR" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <append>true</append>
- <filter class="ch.qos.logback.classic.filter.LevelFilter">
- <level>ERROR</level>
- </filter>
- <file>${LOG_HOME}/log-ge-error.log</file>
- <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
- <fileNamePattern>${LOG_HOME}/log-ge-error-%i.log</fileNamePattern>
- <minIndex>1</minIndex>
- <maxIndex>5</maxIndex>
- </rollingPolicy>
- <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
- <maxFileSize>100MB</maxFileSize>
- </triggeringPolicy>
- <encoder charset="UTF-8">
- <pattern>${LOG_PATTERN}</pattern>
- <charset>UTF-8</charset>
- </encoder>
- </appender>
-
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <encoder>
- <pattern>%-4relative [%thread] %-5level %logger{35} - %msg %n</pattern>
- </encoder>
- </appender>
-
- <logger name="taiji.hn.axv1" level="TRACE">
- <appender-ref ref="LEVEL_GE_INFO"/>
- </logger>
- <root level="ERROR">
- <appender-ref ref="LEVEL_GE_ERROR"/>
- </root>
-
- <root level="DEBUG">
- <appender-ref ref="LEVEL_GE_DEBUG"/>
- </root>
-
- <root level="WARN">
- <appender-ref ref="LEVEL_GE_WARN"/>
- </root>
- </configuration>
|