Commit ef7c8d87 by Lizh

将logback配置文件外置,方便修改

parent 07b66491
#!/bin/bash
#!/usr/bin/env bash
APP_NAME="custom-server"
APP_JAR="custom-server-starter-1.0.jar"
......@@ -22,6 +22,7 @@ nohup $JAVA_HOME/bin/java -Xms2g -Xmx4g -XX:+UseG1GC \
-jar $APP_JAR \
--spring.profiles.active=prod \
--spring.config.location=file:config/ \
--logging.config=file:config/logback-spring.xml \
>> /dev/null 2>&1 &
NEW_PID=$!
......
#!/bin/bash
#!/usr/bin/env bash
APP_NAME="custom-server"
APP_JAR="custom-server-starter-1.0.jar"
......
......@@ -4,7 +4,7 @@
<property name="max.file.size" value="50MB"/>
<property name="max.total.size" value="2GB"/>
<!-- ==================== 日志路径 ==================== -->
<property name="log.path" value="./custom-v3/logs"/>
<property name="log.path" value="./logs/api-v3"/>
<!-- ==================== 日志格式 ==================== -->
<property name="log.pattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} [%X{traceId}] - [%method,%line] - %msg%n"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment