Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
sentinel
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
曲欣亮
sentinel
Commits
5b72237e
Commit
5b72237e
authored
Nov 13, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改日志配置
parent
5cd40145
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
8 deletions
+21
-8
application-dev.properties
src/main/resources/application-dev.properties
+1
-1
logback.xml
src/main/resources/logback.xml
+20
-7
No files found.
src/main/resources/application-dev.properties
View file @
5b72237e
spring.datasource.url
=
jdbc:mysql://10.10.0.111:3306/film_
critic_2018
?useSSL=false&useUnicode=true&characterEncoding=utf8
spring.datasource.url
=
jdbc:mysql://10.10.0.111:3306/film_
new
?useSSL=false&useUnicode=true&characterEncoding=utf8
spring.datasource.username
=
root
spring.datasource.password
=
egolm#2018
spring.datasource.driver-class-name
=
com.mysql.jdbc.Driver
...
...
src/main/resources/logback.xml
View file @
5b72237e
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<property
name=
"LOG_BASE_PATH"
value=
"/data/logs/film"
/>
<include
resource=
"org/springframework/boot/logging/logback/base.xml"
/>
<logger
name=
"springfox"
level=
"ERROR"
/>
<logger
name=
"com.egolm"
level=
"DEBUG"
/>
<appender
name=
"siftingAppender"
class=
"ch.qos.logback.classic.sift.SiftingAppender"
>
<discriminator>
<key>
CTX_PATH
</key>
<key>
context
</key>
<DefaultValue>
logback
</DefaultValue>
</discriminator>
<sift>
<appender
name=
"rollingFileAppender"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<FileNamePattern>
${LOG_BASE_PATH}
/${CTX_PATH}-%d{yyyy-MM-dd}.log
</FileNamePattern>
<FileNamePattern>
/data/logs/film
/${CTX_PATH}-%d{yyyy-MM-dd}.log
</FileNamePattern>
<MaxHistory>
30
</MaxHistory>
</rollingPolicy>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
...
...
@@ -31,4 +26,22 @@
<appender-ref
ref=
"siftingAppender"
/>
</root>
<springProfile
name=
"dev"
>
<root
level=
"DEBUG"
>
<appender-ref
ref=
"siftingAppender"
/>
</root>
</springProfile>
<springProfile
name=
"pro"
>
<root
level=
"INFO"
>
<appender-ref
ref=
"siftingAppender"
/>
</root>
</springProfile>
<logger
name=
"springfox"
level=
"ERROR"
/>
<logger
name=
"javax"
level=
"ERROR"
/>
<logger
name=
"java"
level=
"ERROR"
/>
<logger
name=
"net"
level=
"ERROR"
/>
<logger
name=
"org"
level=
"INFO"
/>
</configuration>
\ No newline at end of file
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