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
63f84068
Commit
63f84068
authored
May 19, 2022
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
将源码打包进jar包
parent
f9697a48
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
+10
-11
AspectLogResult.java
.../main/java/com/yanzuoguang/cloud/aop/AspectLogResult.java
+1
-3
LogLocal.java
...src/main/java/com/yanzuoguang/cloud/aop/log/LogLocal.java
+9
-8
No files found.
yzg-util-cloud/src/main/java/com/yanzuoguang/cloud/aop/AspectLogResult.java
View file @
63f84068
...
...
@@ -83,9 +83,7 @@ public class AspectLogResult {
String
json
=
JsonHelper
.
serialize
(
responseResult
);
Log
.
error
(
cls
,
resultEx
,
"%s [ %s ] time %d ms, result: %s"
,
tag
,
url
,
time
,
aspectLogBody
.
getMaxString
(
json
));
if
(
isError
)
{
logLocal
.
result
(
log
,
responseResult
.
getCode
(),
json
);
}
logLocal
.
result
(
log
,
responseResult
.
getCode
(),
json
,
isError
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
...
...
yzg-util-cloud/src/main/java/com/yanzuoguang/cloud/aop/log/LogLocal.java
View file @
63f84068
...
...
@@ -76,11 +76,12 @@ public class LogLocal implements ThreadNext.Next, InitializingBean {
/**
* 写入状态
*
* @param log 日志对象
* @param status 状态
* @param result 结果
* @param log 日志对象
* @param status 状态
* @param result 结果
* @param isError 是否出错
*/
public
void
result
(
LogVo
log
,
String
status
,
String
result
)
{
public
void
result
(
LogVo
log
,
String
status
,
String
result
,
boolean
isError
)
{
if
(
log
==
null
)
{
return
;
}
...
...
@@ -89,7 +90,7 @@ public class LogLocal implements ThreadNext.Next, InitializingBean {
if
(
isLog
)
{
this
.
remove
(
log
);
}
else
{
this
.
result
(
log
,
status
,
result
,
true
);
this
.
result
Write
(
log
,
status
,
result
,
isError
);
}
}
...
...
@@ -101,7 +102,7 @@ public class LogLocal implements ThreadNext.Next, InitializingBean {
* @param result 结果
* @param write 写入
*/
private
void
result
(
LogVo
log
,
String
status
,
String
result
,
boolean
write
)
{
private
void
result
Write
(
LogVo
log
,
String
status
,
String
result
,
boolean
write
)
{
if
(
log
==
null
||
StringHelper
.
isEmpty
(
log
.
getLogId
()))
{
return
;
}
...
...
@@ -131,7 +132,7 @@ public class LogLocal implements ThreadNext.Next, InitializingBean {
* @param log 删除日志
*/
private
void
remove
(
LogVo
log
)
{
this
.
result
(
log
,
StringHelper
.
EMPTY
,
StringHelper
.
EMPTY
,
false
);
this
.
result
Write
(
log
,
StringHelper
.
EMPTY
,
StringHelper
.
EMPTY
,
false
);
}
/**
...
...
@@ -140,7 +141,7 @@ public class LogLocal implements ThreadNext.Next, InitializingBean {
* @param timeout 超时对象
*/
private
void
writeTimeout
(
Timeout
<
LogVo
>
timeout
)
{
this
.
result
(
timeout
.
getData
(),
MAX_TIME
,
MAX_TIME_NAME
,
true
);
this
.
result
Write
(
timeout
.
getData
(),
MAX_TIME
,
MAX_TIME_NAME
,
true
);
}
/**
...
...
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