...
|
...
|
@@ -94,6 +94,17 @@ |
|
|
</encoder>
|
|
|
</appender>
|
|
|
|
|
|
|
|
|
<appender name="REQUEST_TIMEOUT_ASYNCFILE" class= "ch.qos.logback.classic.AsyncAppender">
|
|
|
<!-- 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 -->
|
|
|
<discardingThreshold >20</discardingThreshold>
|
|
|
<!-- 更改默认的队列的深度,该值会影响性能.默认值为256 -->
|
|
|
<queueSize>256</queueSize>
|
|
|
<neverBlock>true</neverBlock>
|
|
|
<!-- 添加附加的appender,最多只能添加一个 -->
|
|
|
<appender-ref ref ="REQUEST_TIMEOUT"/>
|
|
|
</appender>
|
|
|
|
|
|
<!-- 数据库超时日志 appender -->
|
|
|
<appender name="DATABASE_TIMEOUT" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
|
<file>${yoho.logs.basedir}/${yoho.search.service.env.namespace}/database-timeout.log</file>
|
...
|
...
|
@@ -148,6 +159,7 @@ |
|
|
</encoder>
|
|
|
</appender>
|
|
|
|
|
|
|
|
|
<!-- 缓存命中请求日志 appender -->
|
|
|
<appender name="CACHE_MATCH_REQUEST_APPENDER" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
|
<file>${yoho.logs.basedir}/${yoho.search.service.env.namespace}/cache-match-request.log</file>
|
...
|
...
|
@@ -293,23 +305,17 @@ |
|
|
</root>
|
|
|
|
|
|
<!-- http请求处理超时日志 -->
|
|
|
<logger name="com.yoho.core.common.monitor.ThreadProfile" additivity="true">
|
|
|
<level value="INFO"/>
|
|
|
<appender-ref ref="REQUEST_TIMEOUT"/>
|
|
|
<logger name="com.yoho.core.common.monitor.ThreadProfile" additivity="false">
|
|
|
<level value="WARN"/>
|
|
|
<appender-ref ref="REQUEST_TIMEOUT_ASYNCFILE"/>
|
|
|
</logger>
|
|
|
|
|
|
<!-- 数据库处理超时日志 -->
|
|
|
<logger name="com.yoho.core.dal.datasource.DataSourceMethodInterceptor" additivity="true">
|
|
|
<logger name="com.yoho.core.dal.datasource.DataSourceMethodInterceptor" additivity="false">
|
|
|
<level value="INFO"/>
|
|
|
<appender-ref ref="DATABASE_TIMEOUT"/>
|
|
|
</logger>
|
|
|
|
|
|
<!-- 服务请求统计 -->
|
|
|
<logger name="com.yoho.core.common.monitor" additivity="true">
|
|
|
<level value="INFO"/>
|
|
|
<appender-ref ref="REQUEST_STAT"/>
|
|
|
</logger>
|
|
|
|
|
|
<!-- 缓存命中率统计日志 -->
|
|
|
<logger name="CACHE_MATCH" additivity="false">
|
|
|
<level value="INFO"/>
|
...
|
...
|
@@ -317,7 +323,7 @@ |
|
|
</logger>
|
|
|
|
|
|
<!-- 缓存命中请求日志 -->
|
|
|
<logger name="CACHE_MATCH_REQUEST" additivity="false">
|
|
|
<logger name="CACHE_MATCH_REQUEST" additivity="${yoho.logs.level}">
|
|
|
<level value="INFO"/>
|
|
|
<appender-ref ref="CACHE_MATCH_REQUEST_APPENDER"/>
|
|
|
</logger>
|
...
|
...
|
|