12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <configuration scan="true" scanPeriod="60 seconds">
- <!-- <include resource="org/springframework/boot/logging/logback/base.xml" /> -->
- <appender name="stdout" class="ch.qos.logback.core.ConsoleAppender">
- <encoder>
- <pattern>%d{yyyy-M-d HH:mm:ss} %t %p %m%n</pattern>
- </encoder>
- </appender>
- <appender name="springboot"
- class="ch.qos.logback.core.rolling.RollingFileAppender">
- <!-- <Encoding>UTF-8</Encoding> -->
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <FileNamePattern>logs/logback/springboot_%d{yyyy-M-d}.log
- </FileNamePattern>
- <MaxHistory>10</MaxHistory>
- </rollingPolicy>
- <encoder>
- <pattern>%d{yyyy-M-d HH:mm:ss} %t %p %m%n</pattern>
- </encoder>
- </appender>
- <appender name="smile"
- class="ch.qos.logback.core.rolling.RollingFileAppender">
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <FileNamePattern>logs/logback/smile_%d{yyyy-M-d}.log
- </FileNamePattern>
- <MaxHistory>10</MaxHistory>
- </rollingPolicy>
- <encoder>
- <pattern>%d{yyyy-M-d HH:mm:ss} %t %p %m%n</pattern>
- </encoder>
- </appender>
- <appender name="mysql"
- class="ch.qos.logback.core.rolling.RollingFileAppender">
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <FileNamePattern>logs/logback/mysql_%d{yyyy-M-d}.log
- </FileNamePattern>
- <MaxHistory>10</MaxHistory>
- </rollingPolicy>
- <encoder>
- <pattern>%d{yyyy-M-d HH:mm:ss} %t %p %m%n</pattern>
- </encoder>
- </appender>
- <appender name="neo4j"
- class="ch.qos.logback.core.rolling.RollingFileAppender">
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <FileNamePattern>logs/logback/neo4j_%d{yyyy-M-d}.log
- </FileNamePattern>
- <MaxHistory>10</MaxHistory>
- </rollingPolicy>
- <encoder>
- <pattern>%d{yyyy-M-d HH:mm:ss} %t %p %m%n</pattern>
- </encoder>
- </appender>
- <root level="INFO">
- <appender-ref ref="stdout" />
- </root>
-
- <!-- spring boot 日志 -->
- <logger name="org.springframework.boot">
- <appender-ref ref="springboot" />
- </logger>
- <!-- 全包日志 -->
- <logger name="com.xczg">
- <appender-ref ref="smile" />
- </logger>
-
- <!-- mybatis sql日志 -->
- <logger name="mapper">
- <appender-ref ref="mysql" />
- </logger>
- <!-- mybatis neo4j日志 -->
- <logger name="neo4jmapper">
- <appender-ref ref="neo4j" />
- </logger>
- </configuration>
|