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
e6fcb2d8
Commit
e6fcb2d8
authored
Jun 24, 2026
by
Lizh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加远程调用错误日志
parent
a99c1ec0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
15 deletions
+6
-15
custom-server-integrate/src/main/java/com/jomalls/custom/integrate/service/impl/SaasAdminServiceImpl.java
+5
-4
custom-server-starter/src/main/resources/logback-spring.xml
+1
-11
No files found.
custom-server-integrate/src/main/java/com/jomalls/custom/integrate/service/impl/SaasAdminServiceImpl.java
View file @
e6fcb2d8
...
...
@@ -75,8 +75,8 @@ public class SaasAdminServiceImpl implements SaasAdminService {
if
(!
StringUtils
.
hasText
(
ids
))
{
return
Collections
.
emptyList
();
}
try
{
String
url
=
adminBaseUrl
+
GET_PROPERTY_BY_IDS_URL
+
"?ids="
+
ids
;
try
{
ResponseEntity
<
SaasAdminApiResponseModel
<
List
<
PropertyModel
>>>
response
=
remoteApiClient
.
get
(
url
,
new
ParameterizedTypeReference
<>()
{},
...
...
@@ -91,7 +91,7 @@ public class SaasAdminServiceImpl implements SaasAdminService {
log
.
warn
(
"[ SaasAdminService ] getByIds 返回空, ids={}"
,
ids
);
return
Collections
.
emptyList
();
}
catch
(
Exception
e
)
{
log
.
error
(
"[ SaasAdminService ]
getByIds 调用失败, ids={}"
,
ids
,
e
);
log
.
error
(
"[ SaasAdminService ]
{} 调用失败, ids={}"
,
url
,
ids
,
e
);
return
Collections
.
emptyList
();
}
}
...
...
@@ -109,9 +109,10 @@ public class SaasAdminServiceImpl implements SaasAdminService {
return
entry
.
data
;
}
// 未命中或已过期 → 远程调用刷新
String
url
=
adminBaseUrl
+
GET_ALL_LIST_URL
;
try
{
ResponseEntity
<
SaasAdminApiResponseModel
<
List
<
CategoryInfoModel
>>>
response
=
remoteApiClient
.
get
(
adminBaseUrl
+
GET_ALL_LIST_URL
,
url
,
new
ParameterizedTypeReference
<>()
{},
getHeader
());
if
(
response
!=
null
&&
response
.
getBody
()
!=
null
)
{
...
...
@@ -123,7 +124,7 @@ public class SaasAdminServiceImpl implements SaasAdminService {
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"[ SaasAdminService ]
getAllList 调用失败"
,
e
);
log
.
error
(
"[ SaasAdminService ]
{} 调用失败"
,
url
,
e
);
}
// 远程调用失败但有旧缓存 → 降级返回旧缓存
if
(
entry
!=
null
)
{
...
...
custom-server-starter/src/main/resources/logback-spring.xml
View file @
e6fcb2d8
...
...
@@ -4,17 +4,7 @@
<property
name=
"max.file.size"
value=
"50MB"
/>
<property
name=
"max.total.size"
value=
"2GB"
/>
<!-- ==================== 日志路径 ==================== -->
<!--
生效优先级(由 Spring Boot LoggingApplicationListener 处理):
1. application-dev.yml: logging.file.path: /var/log/app
2. JVM 启动参数: -DLOG_PATH=/var/log/app
3. 环境变量: export LOG_PATH=/var/log/app
4. 以上均未设置 → defaultValue: ./custom-v3/logs
LOG_PATH → logging.file.path 的映射由 Spring Boot 内置完成,
springProperty 从 Environment 中读取最终的 logging.file.path 值。
-->
<springProperty
scope=
"context"
name=
"log.path"
source=
"logging.file.path"
defaultValue=
"./custom-v3/logs"
/>
<property
name=
"log.path"
value=
"./custom-v3/logs"
/>
<!-- ==================== 日志格式 ==================== -->
<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