From 33ab45fd0086a11582f2bb1c12bfae73938399b2 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 26 Apr 2021 09:46:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A2=B3=E7=90=86=20logback-spring.xml=20?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tracer/core/aop/BizTraceAspect.java | 2 +- src/main/resources/application-local.yaml | 1 + src/main/resources/logback-spring.xml | 62 ++++++++----------- 3 files changed, 29 insertions(+), 36 deletions(-) diff --git a/src/main/java/cn/iocoder/dashboard/framework/tracer/core/aop/BizTraceAspect.java b/src/main/java/cn/iocoder/dashboard/framework/tracer/core/aop/BizTraceAspect.java index 5f1d945b0..bff0fe300 100644 --- a/src/main/java/cn/iocoder/dashboard/framework/tracer/core/aop/BizTraceAspect.java +++ b/src/main/java/cn/iocoder/dashboard/framework/tracer/core/aop/BizTraceAspect.java @@ -58,7 +58,7 @@ public class BizTraceAspect { span.setTag(BizTrace.TYPE_TAG, StrUtil.toString(SpElUtil.analysisSpEl(trace.type(), joinPoint))); span.setTag(BizTrace.ID_TAG, StrUtil.toString(SpElUtil.analysisSpEl(trace.id(), joinPoint))); } catch (Exception ex) { - log.error("[around][解析 bizType 与 bizId 发生异常]", ex); + log.error("[setBizTag][解析 bizType 与 bizId 发生异常]", ex); } } diff --git a/src/main/resources/application-local.yaml b/src/main/resources/application-local.yaml index f99655ebe..fd25bfc64 100644 --- a/src/main/resources/application-local.yaml +++ b/src/main/resources/application-local.yaml @@ -146,6 +146,7 @@ spring: logging: file: path: ${user.home}/logs/ # 日志文件的路径 + name: ${spring.application.name} # 日志文件名 --- #################### 芋道相关配置 #################### diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml index 16f7d5261..49eb3c249 100644 --- a/src/main/resources/logback-spring.xml +++ b/src/main/resources/logback-spring.xml @@ -1,70 +1,62 @@ -   -   + + + + + +       - %d{ISO8601} | %tid | %thread | %-5level | %msg%n + ${PATTERN_DEFAULT} + - - ./logs/ruoyi-vue-pro-%d{yyyy-MM-dd_HH}.log - 3 - - %d{ISO8601} | %tid | %thread | %-5level | %msg%n + ${PATTERN_DEFAULT} - - 10MB - + + ${LOG_FILE}.%d{yyyy-MM-dd}.%i.log} + 10MB + 7 + false + - 0 10 - + - %d{yyyy-MM-dd HH:mm:ss.SSS} [%X{tid}] [%thread] %-5level %logger{36} -%msg%n + ${PATTERN_DEFAULT} - s + - - + + + + + - - - + + + + - - - - - - - -        -     -   - - - - -