Skip to content

Commit 1bea219

Browse files
committed
v0.17.1
1 parent 0932f9a commit 1bea219

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

glc-logback-appender/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>top.gotoeasy</groupId>
77
<artifactId>glc-logback-appender</artifactId>
8-
<version>0.17.0</version>
8+
<version>0.17.1</version>
99
<description>logback appender for glogcenter</description>
1010

1111
<repositories>

glc-logback-appender/src/main/java/top/gotoeasy/framework/glc/logback/appender/GlcHttpJsonAppender.java

+8
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,14 @@ public void start() {
139139
if (apiUrl != null) {
140140
apiUrl = apiUrl.trim();
141141
if (!"".equals(apiUrl)) {
142+
if (!apiUrl.endsWith("/glc/v1/log/add")) {
143+
// 允许省略接口路径,默认自动补足以简化使用
144+
if (apiUrl.endsWith("/")) {
145+
apiUrl += "glc/v1/log/add";
146+
} else {
147+
apiUrl += "/glc/v1/log/add";
148+
}
149+
}
142150
setGlcApiUrl(apiUrl);
143151
}
144152
}

0 commit comments

Comments
 (0)