Skip to content

Commit 73fa4e6

Browse files
authored
Merge pull request #26 from homeant/master
修改日志输出目录
2 parents ea1baf9 + b733a4c commit 73fa4e6

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"hints": [],
3+
"groups": [],
4+
"properties": [
5+
{
6+
"name": "logging.moss.path",
7+
"type": "java.lang.String",
8+
"defaultValue":"/opt/app/logs",
9+
"description":"logback files prefix."
10+
}
11+
]
12+
}

moss-web/src/main/resources/application.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ spring:
2929
server:
3030
port: 8080
3131

32+
3233
eureka:
3334
instance:
3435
leaseRenewalIntervalInSeconds: 10
@@ -46,3 +47,7 @@ management.endpoints.health.show-details: true
4647

4748
### 替换成自己的skywalking URL
4849
moss.skywalking.url: http://skywalking.com
50+
51+
logging:
52+
moss:
53+
path: /opt/app/logs

moss-web/src/main/resources/logback.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
2-
<configuration scan="true">
3-
<property name="logDir" value="/opt/app/logs" />
2+
<configuration scan="true" >
3+
<springProperty scope="context" name="logDir" source="logging.moss.path" defaultValue="/opt/app/logs"/>
44
<springProperty scope="context" name="app.name" source="spring.application.name"/>
55
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
66
<layout class="ch.qos.logback.classic.PatternLayout">

0 commit comments

Comments
 (0)