Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
custom-server
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lizhonghong
custom-server
Commits
ef7c8d87
Commit
ef7c8d87
authored
Jun 25, 2026
by
Lizh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
将logback配置文件外置,方便修改
parent
07b66491
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
custom-server-starter/src/main/bin/startup.sh
+2
-1
custom-server-starter/src/main/bin/stop.sh
+1
-1
custom-server-starter/src/main/resources/logback-spring.xml
+1
-1
No files found.
custom-server-starter/src/main/bin/startup.sh
View file @
ef7c8d87
#!/
bin/
bash
#!/
usr/bin/env
bash
APP_NAME
=
"custom-server"
APP_NAME
=
"custom-server"
APP_JAR
=
"custom-server-starter-1.0.jar"
APP_JAR
=
"custom-server-starter-1.0.jar"
...
@@ -22,6 +22,7 @@ nohup $JAVA_HOME/bin/java -Xms2g -Xmx4g -XX:+UseG1GC \
...
@@ -22,6 +22,7 @@ nohup $JAVA_HOME/bin/java -Xms2g -Xmx4g -XX:+UseG1GC \
-jar
$APP_JAR
\
-jar
$APP_JAR
\
--spring
.profiles.active
=
prod
\
--spring
.profiles.active
=
prod
\
--spring
.config.location
=
file:config/
\
--spring
.config.location
=
file:config/
\
--logging
.config
=
file:config/logback-spring.xml
\
>>
/dev/null 2>&1 &
>>
/dev/null 2>&1 &
NEW_PID
=
$!
NEW_PID
=
$!
...
...
custom-server-starter/src/main/bin/stop.sh
View file @
ef7c8d87
#!/
bin/
bash
#!/
usr/bin/env
bash
APP_NAME
=
"custom-server"
APP_NAME
=
"custom-server"
APP_JAR
=
"custom-server-starter-1.0.jar"
APP_JAR
=
"custom-server-starter-1.0.jar"
...
...
custom-server-starter/src/main/resources/logback-spring.xml
View file @
ef7c8d87
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<property
name=
"max.file.size"
value=
"50MB"
/>
<property
name=
"max.file.size"
value=
"50MB"
/>
<property
name=
"max.total.size"
value=
"2GB"
/>
<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"
/>
<property
name=
"log.pattern"
value=
"%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} [%X{traceId}] - [%method,%line] - %msg%n"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment