<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <property name="log_path" value="logs"/>
  <!--  参数  -->

  <!-- 控制台日志 -->
  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <encoder>
      <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} : %msg%n</pattern>
      <charset>UTF-8</charset>
    </encoder>
  </appender>

  <!--  本地日志文件 -->
  <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <file>${log_path}/cctp-engine.log</file>
    <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
      <fileNamePattern>${log_path}/cctp-engine-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
      <maxHistory>10</maxHistory>
      <maxFileSize>10MB</maxFileSize>
    </rollingPolicy>
    <append>true</append>
    <encoder>
      <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} : %msg%n</pattern>
      <charset>UTF-8</charset>
    </encoder>
  </appender>

  <logger name="net.northking.cctp.se" level="DEBUG"/>

  <root level="INFO">
    <appender-ref ref="STDOUT"/>
    <appender-ref ref="FILE"/>
  </root>
</configuration>