From 5a2e4299b4a15ecff8964db2052687bad98a12c7 Mon Sep 17 00:00:00 2001 From: xiang Date: Thu, 4 Sep 2025 23:25:41 +0800 Subject: [PATCH] =?UTF-8?q?feat:=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 --- xs-server/src/main/resources/application.yml | 2 + .../src/main/resources/logback-spring.xml | 102 ++++++++++++++++++ 2 files changed, 104 insertions(+) create mode 100644 xs-server/src/main/resources/logback-spring.xml diff --git a/xs-server/src/main/resources/application.yml b/xs-server/src/main/resources/application.yml index 43e29ae..7315f71 100644 --- a/xs-server/src/main/resources/application.yml +++ b/xs-server/src/main/resources/application.yml @@ -8,6 +8,8 @@ spring: mvc: pathmatch: matching-strategy: ant_path_matcher + main: + allow-bean-definition-overriding: true mybatis: mapper-locations: diff --git a/xs-server/src/main/resources/logback-spring.xml b/xs-server/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..70102cf --- /dev/null +++ b/xs-server/src/main/resources/logback-spring.xml @@ -0,0 +1,102 @@ + + + + + + ${APP_NAME} + + + + + + + + + + + + + + %boldGreen(%contextName): %boldCyan(%d{yyyy-MM-dd HH:mm:ss:SSS}) %highlight([%c]) %boldMagenta([%t]) %boldCyan([%L]) %highlight([traceId:%X{traceId:-},spanId:%X{spanId:-},localIp:%X{localIp:-}]) %boldGreen([%p]) - %msg%n + + + UTF-8 + + + + + + + + ${LOG_HOME}/debug-%d{yyyy-MM-dd}.log + + ${LOG_MAX_HISTORY} + + + + %contextName: %d{yyyy-MM-dd HH:mm:ss.SSS} [%c][%t][%L][%p] [traceId:%X{traceId:-},spanId:%X{spanId:-},localIp:%X{localIp:-}] - %msg%n + UTF-8 + + + + debug + ACCEPT + DENY + + + + + + + + ${LOG_HOME}/info-%d{yyyy-MM-dd}.log + + ${LOG_MAX_HISTORY} + + + + %contextName: %d{yyyy-MM-dd HH:mm:ss.SSS} [%c][%t][%L][%p] [traceId:%X{traceId:-},spanId:%X{spanId:-},localIp:%X{localIp:-}] - %msg%n + UTF-8 + + + + + info + ACCEPT + DENY + + + + + + + + ${LOG_HOME}/error-%d{yyyy-MM-dd}.log + + ${LOG_MAX_HISTORY} + + + + %contextName: %d{yyyy-MM-dd HH:mm:ss.SSS} [%c][%t][%L][%p] [traceId:%X{traceId:-},spanId:%X{spanId:-},localIp:%X{localIp:-}] - %msg%n + UTF-8 + + + + error + ACCEPT + DENY + + + + + + + + + + + + + + + \ No newline at end of file