Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
Y
yzg-util
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
YZG
yzg-util
Commits
0b38ddd8
Commit
0b38ddd8
authored
May 12, 2022
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复等待时间
parent
aa671aaa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
6 deletions
+4
-6
AspectLogBody.java
...rc/main/java/com/yanzuoguang/cloud/aop/AspectLogBody.java
+2
-3
AspectLogResult.java
.../main/java/com/yanzuoguang/cloud/aop/AspectLogResult.java
+1
-1
AspectLogStart.java
...c/main/java/com/yanzuoguang/cloud/aop/AspectLogStart.java
+1
-2
No files found.
yzg-util-cloud/src/main/java/com/yanzuoguang/cloud/aop/AspectLogBody.java
View file @
0b38ddd8
...
...
@@ -51,11 +51,10 @@ public class AspectLogBody {
public
String
getBodyString
(
Object
body
)
{
String
ret
;
if
(
body
instanceof
String
)
{
ret
=
(
String
)
body
;
ret
=
getMaxString
((
String
)
body
)
;
}
else
{
ret
=
JsonHelper
.
serialize
(
body
);
ret
=
getMaxString
(
JsonHelper
.
serialize
(
body
)
);
}
ret
=
getMaxString
(
ret
);
return
ret
;
}
...
...
yzg-util-cloud/src/main/java/com/yanzuoguang/cloud/aop/AspectLogResult.java
View file @
0b38ddd8
...
...
@@ -48,7 +48,7 @@ public class AspectLogResult {
* @param resultEx 异常结果
* @param log 内容
*/
@Async
//
@Async
public
void
responseLog
(
Class
<?>
cls
,
String
tag
,
String
url
,
boolean
logFlag
,
long
start
,
Object
requestBody
,
Object
result
,
Exception
resultEx
,
LogVo
log
)
{
try
{
...
...
yzg-util-cloud/src/main/java/com/yanzuoguang/cloud/aop/AspectLogStart.java
View file @
0b38ddd8
...
...
@@ -35,11 +35,10 @@ public class AspectLogStart {
* @param logFlag
* @return
*/
@Async
//
@Async
public
void
requestLog
(
Class
<?>
cls
,
String
tag
,
String
url
,
Object
requestBody
,
LogVo
log
,
boolean
logFlag
)
{
try
{
String
body
=
aspectLogBody
.
getBodyString
(
requestBody
);
body
=
aspectLogBody
.
getMaxString
(
body
);
if
(
logFlag
)
{
this
.
logLocal
.
startLog
(
log
,
tag
,
String
.
format
(
"%s:%s"
,
this
.
cloudConfig
.
getApplicationName
(),
url
),
body
);
}
...
...
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