Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
T
tamp_fund
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周鹏
tamp_fund
Commits
6326a016
Commit
6326a016
authored
May 25, 2021
by
xd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feo日志统一
parent
e938cb88
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
23 deletions
+26
-23
logback.xml
src/main/resources/logback.xml
+26
-23
No files found.
src/main/resources/logback.xml
View file @
6326a016
<?xml version="1.0" encoding="UTF-8"?>
<configuration
scan=
"true"
scanPeriod=
"5 seconds"
>
<configuration
scan=
"true"
scanPeriod=
"
1
5 seconds"
>
<property
name=
"LOG_PATH"
value=
"/data/logs
/fund/
"
/>
<property
name=
"LOG_FILE"
value=
"
fund
"
/>
<property
name=
"LOG_PATH"
value=
"/data/logs"
/>
<property
name=
"LOG_FILE"
value=
"
app
"
/>
<!-- <if condition='property("apollo.bootstrap.enabled").contains("false")'>-->
<!-- <then>-->
<appender
name=
"console"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<encoder>
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{500}:%line - %msg%n
</pattern>
</encoder>
</appender>
<!-- <root>-->
<!-- <appender-ref ref="console" />-->
<!-- </root>-->
<!-- </then>-->
<!-- </if>-->
<!-- info日志记录器,日期滚动记录 -->
<appender
name=
"file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
...
...
@@ -24,8 +17,12 @@
</encoder>
<append>
true
</append>
<file>
${LOG_PATH}/${LOG_FILE}.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<fileNamePattern>
${LOG_PATH}/${LOG_FILE}_%d{yyyy-MM-dd}.log.gz
</fileNamePattern>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"
>
<fileNamePattern>
${LOG_PATH}/${LOG_FILE}_%d{yyyy-MM-dd}.%i.log.gz
</fileNamePattern>
<maxFileSize>
128MB
</maxFileSize>
<totalSizeCap>
2GB
</totalSizeCap>
<!--日志文件保留天数 -->
<MaxHistory>
14
</MaxHistory>
</rollingPolicy>
</appender>
...
...
@@ -35,10 +32,15 @@
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}:%line - %msg%n
</pattern>
</encoder>
<append>
true
</append>
<file>
${LOG_PATH}/${LOG_FILE}_error.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<fileNamePattern>
${LOG_PATH}/${LOG_FILE}_error_%d{yyyy-MM-dd}.log.gz
</fileNamePattern>
<file>
${LOG_PATH}/error.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"
>
<fileNamePattern>
${LOG_PATH}/error_%d{yyyy-MM-dd}.%i.log.gz
</fileNamePattern>
<maxFileSize>
128MB
</maxFileSize>
<totalSizeCap>
1GB
</totalSizeCap>
<MaxHistory>
14
</MaxHistory>
</rollingPolicy>
<!-- 此日志文件只记录ERROR级别的 -->
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
error
</level>
...
...
@@ -48,8 +50,9 @@
</appender>
<root
level=
"info"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"file"
/>
<appender-ref
ref=
"errorFile"
/>
<appender-ref
ref=
"console"
/>
</root>
</configuration>
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