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
d5840302
Commit
d5840302
authored
Mar 22, 2021
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
不记录系统日志
parent
bed62e59
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
LogVo.java
...til-base/src/main/java/com/yanzuoguang/util/vo/LogVo.java
+14
-0
BaseRequestAspect.java
...ain/java/com/yanzuoguang/cloud/aop/BaseRequestAspect.java
+3
-2
No files found.
yzg-util-base/src/main/java/com/yanzuoguang/util/vo/LogVo.java
View file @
d5840302
...
...
@@ -38,6 +38,12 @@ public class LogVo extends BaseVo {
@ApiModelProperty
(
value
=
"请求内容"
,
required
=
true
,
example
=
"{}"
)
private
String
content
;
/**
* 执行后的请求内容
*/
@ApiModelProperty
(
value
=
"执行后的请求内容,仅仅在内容有变化时写入"
,
required
=
true
,
example
=
"{}"
)
private
String
contentTo
;
/**
* 返回参数
*/
...
...
@@ -94,6 +100,14 @@ public class LogVo extends BaseVo {
this
.
content
=
content
;
}
public
String
getContentTo
()
{
return
contentTo
;
}
public
void
setContentTo
(
String
contentTo
)
{
this
.
contentTo
=
contentTo
;
}
public
String
getResult
()
{
return
result
;
}
...
...
yzg-util-cloud/src/main/java/com/yanzuoguang/cloud/aop/BaseRequestAspect.java
View file @
d5840302
...
...
@@ -203,8 +203,9 @@ public class BaseRequestAspect {
protected
void
responseLog
(
Class
<?>
cls
,
String
tag
,
String
url
,
boolean
logFlag
,
long
start
,
String
requestBody
,
Object
result
,
Exception
resultEx
,
LogVo
log
)
{
try
{
log
.
setContent
(
requestBody
);
if
(!
StringHelper
.
compare
(
log
.
getContent
(),
requestBody
))
{
log
.
setContentTo
(
requestBody
);
}
long
time
=
System
.
currentTimeMillis
()
-
start
;
boolean
isLogDisplay
=
(
logFlag
&&
logCommon
)
||
resultEx
!=
null
;
boolean
isLogDatabase
=
log
!=
null
||
resultEx
!=
null
;
...
...
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