修改为异步日志
parent
4e0f74e2ed
commit
4d7217086a
|
@ -55,21 +55,29 @@
|
|||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- 异步 Syslog 配置 -->
|
||||
<appender name="ASYNC_SYSLOG" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="SYSLOG"/>
|
||||
<queueSize>5000</queueSize> <!-- 设置队列大小,取决于应用负载 -->
|
||||
<discardingThreshold>0</discardingThreshold> <!-- 设置丢弃策略 -->
|
||||
<includeCallerData>true</includeCallerData>
|
||||
</appender>
|
||||
|
||||
<root level="${logging.level.root}">
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
<appender-ref ref="LOG_FILE"/>
|
||||
<appender-ref ref="SYSLOG"/>
|
||||
<appender-ref ref="ASYNC_SYSLOG"/>
|
||||
</root>
|
||||
|
||||
<logger name="com.bocloud" level="${logging.level.com.bocloud}" additivity="false">
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
<appender-ref ref="LOG_FILE"/>
|
||||
<appender-ref ref="SYSLOG"/>
|
||||
<appender-ref ref="ASYNC_SYSLOG"/>
|
||||
</logger>
|
||||
|
||||
<logger name="com.alibaba.druid.pool.DruidAbstractDataSource" level="error" additivity="false">
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
<appender-ref ref="LOG_FILE"/>
|
||||
<appender-ref ref="SYSLOG"/>
|
||||
<appender-ref ref="ASYNC_SYSLOG"/>
|
||||
</logger>
|
||||
</configuration>
|
Loading…
Reference in New Issue