Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
sap-service
Project
Project
Details
Activity
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
曲欣亮
sap-service
Commits
9a0e4397
Commit
9a0e4397
authored
Jul 17, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
cddaf543
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
ExceptionAspect.java
src/main/java/com/egolm/sso/config/ExceptionAspect.java
+0
-1
logback.xml
src/main/resources/logback.xml
+13
-0
No files found.
src/main/java/com/egolm/sso/config/ExceptionAspect.java
View file @
9a0e4397
...
@@ -17,7 +17,6 @@ public class ExceptionAspect {
...
@@ -17,7 +17,6 @@ public class ExceptionAspect {
@AfterThrowing
(
throwing
=
"ex"
,
pointcut
=
execution
)
@AfterThrowing
(
throwing
=
"ex"
,
pointcut
=
execution
)
public
void
afterThrowing
(
Throwable
ex
)
{
public
void
afterThrowing
(
Throwable
ex
)
{
logger
.
error
(
"未处理异常"
,
ex
);
logger
.
error
(
"未处理异常"
,
ex
);
//TODO 统一异常处理
}
}
}
}
src/main/resources/logback.xml
View file @
9a0e4397
...
@@ -19,6 +19,16 @@
...
@@ -19,6 +19,16 @@
<pattern>
${CONSOLE_LOG_PATTERN}
</pattern>
<pattern>
${CONSOLE_LOG_PATTERN}
</pattern>
</encoder>
</encoder>
</appender>
</appender>
<appender
name=
"errorAppender"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
/logs/venality.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<FileNamePattern>
/data/logs/sap-service/${context}-%d{yyyy-MM-dd}.err.log
</FileNamePattern>
<MaxHistory>
30
</MaxHistory>
</rollingPolicy>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<pattern>
${CONSOLE_LOG_PATTERN}
</pattern>
</encoder>
</appender>
</sift>
</sift>
</appender>
</appender>
...
@@ -36,6 +46,9 @@
...
@@ -36,6 +46,9 @@
<root
level=
"INFO"
>
<root
level=
"INFO"
>
<appender-ref
ref=
"siftingAppender"
/>
<appender-ref
ref=
"siftingAppender"
/>
</root>
</root>
<logger
name=
"com.egolm.sso.config.ExceptionAspect"
level=
"ERROR"
>
<appender-ref
ref=
"errorAppender"
/>
</logger>
</springProfile>
</springProfile>
<!-- <logger name="com.microsoft" level="INFO" />
<!-- <logger name="com.microsoft" level="INFO" />
...
...
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