...
|
...
|
@@ -139,6 +139,24 @@ |
|
|
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger:%line - %msg%n</pattern>
|
|
|
</encoder>
|
|
|
</appender>
|
|
|
|
|
|
<!-- 爬虫相关 appender -->
|
|
|
<appender name="FLOW_EXECUTOR_APPAND" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
|
<file>${yoho.logs.basedir}/${yoho.search.consumer.env.namespace}/spider.log</file>
|
|
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
|
<!-- daily rollover -->
|
|
|
<fileNamePattern>${yoho.logs.basedir}/${yoho.search.consumer.env.namespace}/archived/spider.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
|
|
|
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
|
|
<!-- or whenever the file size reaches 100MB -->
|
|
|
<maxFileSize>10MB</maxFileSize>
|
|
|
</timeBasedFileNamingAndTriggeringPolicy>
|
|
|
<!-- keep 30 days' worth of history -->
|
|
|
<maxHistory>7</maxHistory>
|
|
|
</rollingPolicy>
|
|
|
<encoder>
|
|
|
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level - %msg%n</pattern>
|
|
|
</encoder>
|
|
|
</appender>
|
|
|
|
|
|
<!-- 事件上报 appender -->
|
|
|
<appender name="SEARCH_EVENT_APPAND" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
...
|
...
|
@@ -205,7 +223,12 @@ |
|
|
<level value="INFO"/>
|
|
|
<appender-ref ref="FLOW_EXECUTOR_APPAND"/>
|
|
|
</logger>
|
|
|
|
|
|
|
|
|
<logger name="SEARCH_SPIDER" additivity="false">
|
|
|
<level value="INFO"/>
|
|
|
<appender-ref ref="SPIDER_APPAND"/>
|
|
|
</logger>
|
|
|
|
|
|
<!-- 事件上报日志 -->
|
|
|
<logger name="SEARCH_EVENT_LOG" additivity="false">
|
|
|
<level value="INFO"/>
|
...
|
...
|
|