|
|
@@ -15,66 +15,7 @@
|
|
|
</appender>
|
|
|
|
|
|
<!-- <appender name="aliyun" class="com.aliyun.openservices.log.logback.LoghubAppender">-->
|
|
|
- <appender name="aliyun" class="com.yy.basedevelop.common.log.AliLoghubAppender">
|
|
|
|
|
|
- <!--必选项-->
|
|
|
- <!-- 账号及网络配置 -->
|
|
|
- <!-- <endpoint>your project endpoint</endpoint>-->
|
|
|
- <endpoint>cn-chengdu.log.aliyuncs.com</endpoint>
|
|
|
-
|
|
|
- <accessKeyId>LTAI5tFXzkZZaz1NVChtkS7g</accessKeyId>
|
|
|
- <accessKeySecret>Pnl4RCmx4yLgLJptChVpK76UmvtygR</accessKeySecret>
|
|
|
-
|
|
|
-
|
|
|
- <!-- sls 项目配置 -->
|
|
|
- <project>log-service-1004674751578531-cn-chengdu</project>
|
|
|
- <logStore>demo</logStore>
|
|
|
- <!--必选项 (end)-->
|
|
|
-
|
|
|
- <!-- 可选项 -->
|
|
|
- <!-- <topic>your topic</topic>-->
|
|
|
- <!-- <source>your source</source>-->
|
|
|
-
|
|
|
- <!-- 可选项 详见 '参数说明'-->
|
|
|
- <totalSizeInBytes>104857600</totalSizeInBytes>
|
|
|
- <maxBlockMs>0</maxBlockMs>
|
|
|
- <ioThreadCount>8</ioThreadCount>
|
|
|
- <batchSizeThresholdInBytes>524288</batchSizeThresholdInBytes>
|
|
|
- <batchCountThreshold>4096</batchCountThreshold>
|
|
|
- <lingerMs>2000</lingerMs>
|
|
|
- <retries>10</retries>
|
|
|
- <baseRetryBackoffMs>100</baseRetryBackoffMs>
|
|
|
- <maxRetryBackoffMs>50000</maxRetryBackoffMs>
|
|
|
-
|
|
|
- <!-- 可选项 通过配置 encoder 的 pattern 自定义 log 的格式 -->
|
|
|
- <encoder>
|
|
|
- <pattern>traceId-%X{traceId}</pattern>
|
|
|
- <!-- %d{HH:mm:ss.SSS} trace_id=%X{trace_id} span_id=%X{span_id} trace_flags=%X{trace_flags} %msg%n-->
|
|
|
- <!-- <pattern>%d %-5level [%thread] %logger{0}: %msg</pattern>-->
|
|
|
- </encoder>
|
|
|
- <MDCProperty>
|
|
|
- <key>traceId</key>
|
|
|
- </MDCProperty>
|
|
|
- <topic>${appName}</topic>
|
|
|
- <traceId>traceId</traceId>
|
|
|
- <!-- 可选项 设置 time 字段呈现的格式 -->
|
|
|
-
|
|
|
- <timeFormat>yyyy-MM-dd HH:mm:ss.SSS</timeFormat>
|
|
|
- <!-- 可选项 设置 time 字段呈现的时区 -->
|
|
|
- <timeZone>GMT+8</timeZone>
|
|
|
- <!-- 可选项 设置是否要添加 Location 字段(日志打印位置),默认为 true -->
|
|
|
- <includeLocation>true</includeLocation>
|
|
|
- <!-- 可选项 当 encoder 不为空时,是否要包含 message 字段,默认为 true -->
|
|
|
- <includeMessage>true</includeMessage>
|
|
|
- <!-- 可选项 可注入自定义的 credentialsProvider,允许用户自行实现 AK 获取逻辑 -->
|
|
|
- <!-- 参见 "自定义凭证提供者 CredentialsProvider" 一节介绍 -->
|
|
|
- <!-- <credentialsProviderBuilder class="com.aliyun.openservices.log.logback.example.ExampleCredentialsProviderBuilder">-->
|
|
|
- <!-- <accessKeyId>${accessKeyId}</accessKeyId>-->
|
|
|
- <!-- <accessKeySecret>${accessKeySecret}</accessKeySecret>-->
|
|
|
- <!-- </credentialsProviderBuilder>-->
|
|
|
- <!-- 可选项,exception 堆栈最大记录长度,超出此长度会被截断,默认值为 500 -->
|
|
|
- <maxThrowable>500</maxThrowable>
|
|
|
- </appender>
|
|
|
|
|
|
<!-- 系统日志输出 -->
|
|
|
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
|
@@ -127,9 +68,11 @@
|
|
|
<!-- 系统模块日志级别控制 -->
|
|
|
<logger name="com.hr" level="info" />
|
|
|
<logger name="com.ruoyi" level="info" />
|
|
|
+ <logger name="com.yy.basedevelop.common.config" level="info" />
|
|
|
+
|
|
|
|
|
|
<!-- Spring日志级别控制 -->
|
|
|
- <logger name="org.springframework" level="warn" />
|
|
|
+ <logger name="org.springframework" level="info" />
|
|
|
|
|
|
<root level="info">
|
|
|
<appender-ref ref="console" />
|