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
a179305b
Commit
a179305b
authored
Aug 08, 2019
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
常规BUG的修改
parent
4fb7598b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
BaseRequestAspect.java
...ain/java/com/yanzuoguang/cloud/aop/BaseRequestAspect.java
+5
-3
No files found.
yzg-util-cloud/src/main/java/com/yanzuoguang/cloud/aop/BaseRequestAspect.java
View file @
a179305b
...
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
import
com.yanzuoguang.cloud.CloudContans
;
import
com.yanzuoguang.util.cache.MemoryCache
;
import
com.yanzuoguang.util.contants.ResultConstants
;
import
com.yanzuoguang.util.exception.ExceptionHelper
;
import
com.yanzuoguang.util.helper.JsonHelper
;
import
com.yanzuoguang.util.helper.StringHelper
;
import
com.yanzuoguang.util.log.Log
;
...
...
@@ -153,7 +154,6 @@ public class BaseRequestAspect implements ThreadNext.Next {
protected
void
responseLog
(
String
tag
,
String
url
,
ProceedingJoinPoint
joinPoint
,
long
start
,
Object
result
,
Exception
resultEx
)
{
try
{
String
name
=
joinPoint
.
getSignature
().
getName
();
// 处理结果
ResponseResult
responseResult
;
if
(
result
instanceof
ResponseResult
)
{
...
...
@@ -164,8 +164,10 @@ public class BaseRequestAspect implements ThreadNext.Next {
long
time
=
System
.
currentTimeMillis
()
-
start
;
if
(
resultEx
!=
null
)
{
Log
.
error
(
joinPoint
.
getSignature
().
getDeclaringType
(),
"%s [ %s ] time %d ms, error: %s"
,
tag
,
name
,
time
,
getMaxString
(
resultEx
.
getMessage
()));
responseResult
=
ExceptionHelper
.
getError
(
resultEx
);
Log
.
error
(
joinPoint
.
getSignature
().
getDeclaringType
(),
"%s [ %s ] time %d ms, result: %s"
,
tag
,
name
,
time
,
getMaxString
(
JsonHelper
.
serialize
(
responseResult
)));
resultEx
.
printStackTrace
();
}
else
{
Log
.
info
(
joinPoint
.
getSignature
().
getDeclaringType
(),
"%s [ %s ] time %d ms, result: %s"
,
tag
,
name
,
time
,
getMaxString
(
JsonHelper
.
serialize
(
responseResult
)));
...
...
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