logback.xml 1.0 KB

1234567891011121314151617181920212223242526272829
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <configuration debug="false" scan="true" scanPeriod="1 seconds">
  3. <contextName>logback</contextName>
  4. <property name="log.path" value="/home/dever/xxl_job/xxl-job-admin.log"/>
  5. <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
  6. <encoder>
  7. <pattern>%d{HH:mm:ss.SSS} %contextName [%thread] %-5level %logger{36} - %msg%n</pattern>
  8. </encoder>
  9. </appender>
  10. <appender name="file" class="ch.qos.logback.core.rolling.RollingFileAppender">
  11. <file>${log.path}</file>
  12. <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
  13. <fileNamePattern>${log.path}.%d{yyyy-MM-dd}.zip</fileNamePattern>
  14. </rollingPolicy>
  15. <encoder>
  16. <pattern>%date %level [%thread] %logger{36} [%file : %line] %msg%n
  17. </pattern>
  18. </encoder>
  19. </appender>
  20. <root level="info">
  21. <appender-ref ref="console"/>
  22. <appender-ref ref="file"/>
  23. </root>
  24. </configuration>