Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jiwei-api
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
马天浩
jiwei-api
Commits
a09070da
Commit
a09070da
authored
Aug 29, 2020
by
matianhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[日志配置] <add> 新增日志配置文件
parent
604e1041
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
logback-spring.xml
src/main/resources/logback-spring.xml
+35
-0
No files found.
src/main/resources/logback-spring.xml
0 → 100644
View file @
a09070da
<?xml version="1.0" encoding="UTF-8"?>
<configuration
scan=
"true"
scanPeriod=
"60 seconds"
debug=
"false"
>
<contextName>
webapi-entity
</contextName>
<springProperty
scope=
"context"
name=
"logLevel"
source=
"logging.level.root"
/>
<springProperty
scope=
"context"
name=
"logPath"
source=
"logging.path"
/>
<!-- 控制台 appender -->
<appender
name=
"console"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<filter
class=
"ch.qos.logback.classic.filter.ThresholdFilter"
>
<level>
INFO
</level>
</filter>
<encoder>
<pattern>
[%d{yyyy-MM-dd HH:mm:ss} %-5level %t] %logger{50} - %msg%n
</pattern>
</encoder>
</appender>
<!-- 文件 appender-->
<appender
name=
"file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${logPath}/spring.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<fileNamePattern>
${logPath}/spring-%d{yyyy-MM-dd}.log
</fileNamePattern>
<maxHistory>
7
</maxHistory>
<totalSizeCap>
350MB
</totalSizeCap>
</rollingPolicy>
<encoder>
<pattern>
[%d{yyyy-MM-dd HH:mm:ss} %-5level %t] %logger{50} - %msg%n
</pattern>
</encoder>
</appender>
<root
level=
"${logLevel}"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"file"
/>
</root>
</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