|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- <configuration scan="true" scanPeriod=" 5 seconds">
- <jmxConfigurator />
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <encoder>
- <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{56} - %msg%n
- </pattern>
- </encoder>
- </appender>
-
- <appender name="CANAL-ROOT" class="ch.qos.logback.classic.sift.SiftingAppender">
- <discriminator>
- <Key>destination</Key>
- <DefaultValue>canal</DefaultValue>
- </discriminator>
- <sift>
- <appender name="FILE-${destination}" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <File>../logs/${destination}/${destination}.log</File>
- <rollingPolicy
- class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <!-- rollover daily -->
- <fileNamePattern>../logs/${destination}/%d{yyyy-MM-dd}/${destination}-%d{yyyy-MM-dd}-%i.log.gz</fileNamePattern>
- <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
- <!-- or whenever the file size reaches 100MB -->
- <maxFileSize>512MB</maxFileSize>
- </timeBasedFileNamingAndTriggeringPolicy>
- <maxHistory>60</maxHistory>
- </rollingPolicy>
- <encoder>
- <pattern>
- %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{56} - %msg%n
- </pattern>
- </encoder>
- </appender>
- </sift>
- </appender>
-
- <appender name="CANAL-META" class="ch.qos.logback.classic.sift.SiftingAppender">
- <discriminator>
- <Key>destination</Key>
- <DefaultValue>canal</DefaultValue>
- </discriminator>
- <sift>
- <appender name="META-FILE-${destination}" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <File>../logs/${destination}/meta.log</File>
- <rollingPolicy
- class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <!-- rollover daily -->
- <fileNamePattern>../logs/${destination}/%d{yyyy-MM-dd}/meta-%d{yyyy-MM-dd}-%i.log.gz</fileNamePattern>
- <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
- <!-- or whenever the file size reaches 100MB -->
- <maxFileSize>32MB</maxFileSize>
- </timeBasedFileNamingAndTriggeringPolicy>
- <maxHistory>60</maxHistory>
- </rollingPolicy>
- <encoder>
- <pattern>
- %d{yyyy-MM-dd HH:mm:ss.SSS} - %msg%n
- </pattern>
- </encoder>
- </appender>
- </sift>
- </appender>
-
- <appender name="RocketmqClientAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>../logs/canal/rocketmq_client.log</file>
- <rollingPolicy
- class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <!-- rollover daily -->
- <fileNamePattern>../logs/canal/%d{yyyy-MM-dd}/rocketmq_client-%d{yyyy-MM-dd}-%i.log.gz</fileNamePattern>
- <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
- <!-- or whenever the file size reaches 100MB -->
- <maxFileSize>512MB</maxFileSize>
- </timeBasedFileNamingAndTriggeringPolicy>
- <maxHistory>60</maxHistory>
- </rollingPolicy>
- <encoder charset="UTF-8">
- <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{56} - %msg%n</pattern>
- </encoder>
- </appender>
-
- <logger name="com.alibaba.otter.canal.instance" additivity="false">
- <level value="INFO" />
- <appender-ref ref="CANAL-ROOT" />
- </logger>
- <logger name="com.alibaba.otter.canal.deployer" additivity="false">
- <level value="INFO" />
- <appender-ref ref="CANAL-ROOT" />
- </logger>
- <logger name="com.alibaba.otter.canal.meta.FileMixedMetaManager" additivity="false">
- <level value="INFO" />
- <appender-ref ref="CANAL-META" />
- </logger>
- <logger name="com.alibaba.otter.canal.connector.kafka" additivity="false">
- <level value="INFO" />
- <appender-ref ref="CANAL-ROOT" />
- </logger>
- <logger name="com.alibaba.otter.canal.connector.rocketmq" additivity="false">
- <level value="INFO" />
- <appender-ref ref="CANAL-ROOT" />
- </logger>
- <logger name="com.alibaba.otter.canal.connector.rabbitmq" additivity="false">
- <level value="INFO" />
- <appender-ref ref="CANAL-ROOT" />
- </logger>
- <logger name="RocketmqClient" additivity="false">
- <level value="INFO" />
- <appender-ref ref="RocketmqClientAppender" />
- </logger>
- <logger name="com.alibaba.otter.canal.connector.pulsarmq" additivity="false">
- <level value="INFO" />
- <appender-ref ref="CANAL-ROOT" />
- </logger>
- <root level="WARN">
- <!-- <appender-ref ref="STDOUT"/> -->
- <appender-ref ref="CANAL-ROOT" />
- </root>
- </configuration>
|