Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
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
youjj
cloud-platform
Commits
77d0142d
Commit
77d0142d
authored
Nov 12, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加日志异常处理
parent
485d1cf5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
AcceptFilter.java
...m/github/wxiaoqi/security/common/filter/AcceptFilter.java
+1
-0
No files found.
ace-common/src/main/java/com/github/wxiaoqi/security/common/filter/AcceptFilter.java
View file @
77d0142d
...
...
@@ -18,6 +18,7 @@ public class AcceptFilter extends Filter<ILoggingEvent> {
if
(
event
.
getLoggerName
().
contains
(
"Exception"
)
||
event
.
getLoggerName
().
contains
(
"ERROR"
))
{
//邮件日志
try
{
log
.
info
(
"发送异常邮件,邮件内容:【服务器异常】: {}"
,
event
.
getLoggerName
()
+
":"
+
event
.
getMessage
());
mailService
.
sendSimpleMail
(
"jiaoruizhen@126.com"
,
"服务器异常"
,
event
.
getLoggerName
()
+
":"
+
event
.
getMessage
());
}
catch
(
Exception
e
)
{
log
.
error
(
"发送异常邮件失败,异常信息: {}"
,
e
);
...
...
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