记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
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
董敬伟
liquidnet-bus-v1
Commits
8899b100
Commit
8899b100
authored
Jun 23, 2021
by
anjiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交生产环境
parent
9b2309c0
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
119 additions
and
295 deletions
+119
-295
application-prod.yml
...-client-admin-web/src/main/resources/application-prod.yml
+34
-22
application-prod.yml
...et-support-config/src/main/resources/application-prod.yml
+1
-1
application-test-server1.yml
...rt-eureka/src/main/resources/application-test-server1.yml
+21
-19
application-test-server2.yml
...rt-eureka/src/main/resources/application-test-server2.yml
+21
-19
application-test-server3.yml
...rt-eureka/src/main/resources/application-test-server3.yml
+21
-19
application.yml
...quidnet-support-eureka/src/main/resources/application.yml
+21
-19
logback-spring.xml
...dnet-support-eureka/src/main/resources/logback-spring.xml
+0
-196
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/application-prod.yml
View file @
8899b100
...
@@ -15,34 +15,46 @@ liquidnet:
...
@@ -15,34 +15,46 @@ liquidnet:
level-root
:
info
level-root
:
info
mysql
:
mysql
:
master
:
master
:
urlHostAndPort
:
39.106.122.201:3308
urlHostAndPort
:
zhengzai-test.rwlb.rds.aliyuncs.com:3306
username
:
testmall
username
:
zhengzai
password
:
zhengzai!mYT
password
:
$hAh4SGcDQ
database-name
:
test_ln_scene
database-name
:
test_ln_scene
slave
:
slave
:
urlHostAndPort
:
39.106.122.201:3308
urlHostAndPort
:
zhengzai-test.rwlb.rds.aliyuncs.com:3306
username
:
testmall
username
:
zhengzai
password
:
zhengzai!mYT
password
:
$hAh4SGcDQ
database-name
:
test_ln_scene
database-name
:
test_ln_scene
mongodb
:
host
:
s-2zef656730e5a1d4.mongodb.rds.aliyuncs.com:3717,s-2ze49872ed6aeb14.mongodb.rds.aliyuncs.com:3717
port
:
3717
user
:
root
pwd
:
$hAh4SGcDQ
sslEnabled
:
false
database
:
test_ln_scene
redis
:
host
:
r-2ze7002ckw5u75fgukpd.redis.rds.aliyuncs.com
# host: r-2zefzyjbij5vbez65y.redis.rds.aliyuncs.com
port
:
6380
password
:
PO@B!Iud32
url-refund
:
url-refund
:
apply
:
"
http://pay.zhengzai.tv/refund/single"
apply
:
"
http://
test
pay.zhengzai.tv/refund/single"
notify
:
"
https://kylin.zhengzai.tv/kylin/refund/callback"
notify
:
"
https://
test
kylin.zhengzai.tv/kylin/refund/callback"
url-banner
:
url-banner
:
provinces
:
"
https://service.zhengzai.tv/provinces"
#省份
provinces
:
"
https://
test
service.zhengzai.tv/provinces"
#省份
url1
:
"
https://mediaapi.zhengzai.tv/api/video/list?per_page=50&page=1&type=1"
#PGC点播
url1
:
"
https://
test
mediaapi.zhengzai.tv/api/video/list?per_page=50&page=1&type=1"
#PGC点播
url2
:
"
https://mediaapi.zhengzai.tv/api/video/list?per_page=50&page=1&type=2"
#PGC直播
url2
:
"
https://
test
mediaapi.zhengzai.tv/api/video/list?per_page=50&page=1&type=2"
#PGC直播
url5
:
"
https://mall.zhengzai.tv/admin/fieldListForQuick?page=1&per_page=50"
#场地
url5
:
"
https://
test
mall.zhengzai.tv/admin/fieldListForQuick?page=1&per_page=50"
#场地
url6
:
"
/kylin/performances/recommend/performance/status?pageNum=1&pageSize=50&status=(3,6,7,8,9,10)&title=''"
#票务
url6
:
"
/kylin/performances/recommend/performance/status?pageNum=1&pageSize=50&status=(3,6,7,8,9,10)&title=''"
#票务
url7
:
"
https://mall.zhengzai.tv/admin/goodListForQuick?page=1&per_page=50"
#商品
url7
:
"
https://
test
mall.zhengzai.tv/admin/goodListForQuick?page=1&per_page=50"
#商品
url8
:
"
https://kylin.zhengzai.tv/kylin/performances/roadShow/list?pageNum=1&pageSize=50"
#巡演
url8
:
"
https://
test
kylin.zhengzai.tv/kylin/performances/roadShow/list?pageNum=1&pageSize=50"
#巡演
url13
:
"
https://mall.zhengzai.tv/admin/integrationListForQuick?page=1&per_page=50"
#积分商城
url13
:
"
https://
test
mall.zhengzai.tv/admin/integrationListForQuick?page=1&per_page=50"
#积分商城
url14
:
"
https://mall.zhengzai.tv/admin/good/collective/quick?page=1&per_page=50"
#商品集合
url14
:
"
https://
test
mall.zhengzai.tv/admin/good/collective/quick?page=1&per_page=50"
#商品集合
url20
:
"
https://merchantapi.zhengzai.tv/admin/mis/musician/quick?page=1&per_page=50"
#音乐人
url20
:
"
https://
test
merchantapi.zhengzai.tv/admin/mis/musician/quick?page=1&per_page=50"
#音乐人
url21
:
"
https://merchantapi.zhengzai.tv/admin/mis/song/quick?page=1&per_page=50"
#歌曲
url21
:
"
https://
test
merchantapi.zhengzai.tv/admin/mis/song/quick?page=1&per_page=50"
#歌曲
url22
:
"
https://merchantapi.zhengzai.tv/admin/mis/album/quick?page=1&per_page=50"
#专辑
url22
:
"
https://
test
merchantapi.zhengzai.tv/admin/mis/album/quick?page=1&per_page=50"
#专辑
url23
:
"
https://mediaapi.zhengzai.tv/api/play/list?page=1&per_page=50"
#视频播单
url23
:
"
https://
test
mediaapi.zhengzai.tv/api/play/list?page=1&per_page=50"
#视频播单
url24
:
"
https://merchantapi.zhengzai.tv/admin/mis/musician/collect?page=1&per_page=50"
#音乐人合集
url24
:
"
https://
test
merchantapi.zhengzai.tv/admin/mis/musician/collect?page=1&per_page=50"
#音乐人合集
url26
:
"
https://passport.zhengzai.tv/admin/vip/card/list?page=1&per_page=50&status=1"
#摩登会员
url26
:
"
https://
test
passport.zhengzai.tv/admin/vip/card/list?page=1&per_page=50&status=1"
#摩登会员
al-oss
:
al-oss
:
imgUrl
:
"
https://img.zhengzai.tv/"
imgUrl
:
"
https://img.zhengzai.tv/"
endpoint
:
http://oss-cn-hangzhou.aliyuncs.com
endpoint
:
http://oss-cn-hangzhou.aliyuncs.com
...
...
liquidnet-bus-support/liquidnet-support-config/src/main/resources/application-prod.yml
View file @
8899b100
...
@@ -11,7 +11,7 @@ liquidnet:
...
@@ -11,7 +11,7 @@ liquidnet:
path
:
./logs
path
:
./logs
name
:
support-config
name
:
support-config
eureka
:
eureka
:
host
:
1
27.0.0.1
:7001
host
:
1
72.17.207.177
:7001
rabbitmq
:
rabbitmq
:
host
:
127.0.0.1
host
:
127.0.0.1
port
:
5672
port
:
5672
...
...
liquidnet-bus-support/liquidnet-support-eureka/src/main/resources/application-test-server1.yml
View file @
8899b100
liquidnet
:
logfile
:
path
:
/data/logs
name
:
support-eureka
file-max-size
:
200MB
pattern-file
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{96}:%line]
-
%msg%n'
pattern-console
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{96}:%line]
-
%msg%n'
pattern-rolling-file-name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level
:
debug
server
:
server
:
port
:
7001
port
:
7001
servlet
:
servlet
:
...
@@ -33,24 +43,16 @@ eureka:
...
@@ -33,24 +43,16 @@ eureka:
# prefer-ip-address: true
# prefer-ip-address: true
# instance-id: ${spring.application.name}:${server.port}
# instance-id: ${spring.application.name}:${server.port}
# hostname: localhost
# hostname: localhost
liquidnet
:
logfile
:
path
:
/logfile
name
:
liquidnet-eureka-server.log
logging
:
logging
:
config
:
classpath:logback-spring.xml
file
:
path
:
${liquidnet.logfile.path}
name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
#logging:
max-size
:
200MB
# file:
pattern
:
# name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}
file
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{96}:%line]
-
%msg%n'
# level:
console
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{96}:%line]
-
%msg%n'
# root: info
rolling-file-name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
# #以下是为指定包设置日志级别
level
:
# com:
root
:
info
# liquidnet:
#以下是为指定包设置日志级别
# stellar:
com.liquidnet
:
${liquidnet.logfile.level}
# controller: info
\ No newline at end of file
## pattern:
## console: %d{yyyy/MM/dd-HH:mm:ss} [%thread] %-5level %logger- %msg%n
## file: %d{yyyy/MM/dd-HH:mm} [%thread] %-5level %logger- %msg%n
liquidnet-bus-support/liquidnet-support-eureka/src/main/resources/application-test-server2.yml
View file @
8899b100
liquidnet
:
logfile
:
path
:
/data/logs
name
:
support-eureka
file-max-size
:
200MB
pattern-file
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{96}:%line]
-
%msg%n'
pattern-console
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{96}:%line]
-
%msg%n'
pattern-rolling-file-name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level
:
debug
server
:
server
:
port
:
7001
port
:
7001
servlet
:
servlet
:
...
@@ -33,24 +43,16 @@ eureka:
...
@@ -33,24 +43,16 @@ eureka:
# prefer-ip-address: true
# prefer-ip-address: true
# instance-id: ${spring.application.name}:${server.port}
# instance-id: ${spring.application.name}:${server.port}
# hostname: localhost
# hostname: localhost
liquidnet
:
logfile
:
path
:
/logfile
name
:
liquidnet-eureka-server.log
logging
:
logging
:
config
:
classpath:logback-spring.xml
file
:
path
:
${liquidnet.logfile.path}
name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
#logging:
max-size
:
200MB
# file:
pattern
:
# name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}
file
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{96}:%line]
-
%msg%n'
# level:
console
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{96}:%line]
-
%msg%n'
# root: info
rolling-file-name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
# #以下是为指定包设置日志级别
level
:
# com:
root
:
info
# liquidnet:
#以下是为指定包设置日志级别
# stellar:
com.liquidnet
:
${liquidnet.logfile.level}
# controller: info
\ No newline at end of file
## pattern:
## console: %d{yyyy/MM/dd-HH:mm:ss} [%thread] %-5level %logger- %msg%n
## file: %d{yyyy/MM/dd-HH:mm} [%thread] %-5level %logger- %msg%n
liquidnet-bus-support/liquidnet-support-eureka/src/main/resources/application-test-server3.yml
View file @
8899b100
liquidnet
:
logfile
:
path
:
/data/logs
name
:
support-eureka
file-max-size
:
200MB
pattern-file
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{96}:%line]
-
%msg%n'
pattern-console
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{96}:%line]
-
%msg%n'
pattern-rolling-file-name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level
:
debug
server
:
server
:
port
:
7001
port
:
7001
servlet
:
servlet
:
...
@@ -33,24 +43,16 @@ eureka:
...
@@ -33,24 +43,16 @@ eureka:
# prefer-ip-address: true
# prefer-ip-address: true
# instance-id: ${spring.application.name}:${server.port}
# instance-id: ${spring.application.name}:${server.port}
# hostname: localhost
# hostname: localhost
liquidnet
:
logfile
:
path
:
/logfile
name
:
liquidnet-eureka-server.log
logging
:
logging
:
config
:
classpath:logback-spring.xml
file
:
path
:
${liquidnet.logfile.path}
name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
#logging:
max-size
:
200MB
# file:
pattern
:
# name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}
file
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{96}:%line]
-
%msg%n'
# level:
console
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{96}:%line]
-
%msg%n'
# root: info
rolling-file-name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
# #以下是为指定包设置日志级别
level
:
# com:
root
:
info
# liquidnet:
#以下是为指定包设置日志级别
# stellar:
com.liquidnet
:
${liquidnet.logfile.level}
# controller: info
\ No newline at end of file
## pattern:
## console: %d{yyyy/MM/dd-HH:mm:ss} [%thread] %-5level %logger- %msg%n
## file: %d{yyyy/MM/dd-HH:mm} [%thread] %-5level %logger- %msg%n
liquidnet-bus-support/liquidnet-support-eureka/src/main/resources/application.yml
View file @
8899b100
liquidnet
:
logfile
:
path
:
/Users/anjiabin/data/logs
name
:
support-eureka
file-max-size
:
200MB
pattern-file
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{96}:%line]
-
%msg%n'
pattern-console
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{96}:%line]
-
%msg%n'
pattern-rolling-file-name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level
:
debug
server
:
server
:
port
:
7001
port
:
7001
servlet
:
servlet
:
...
@@ -33,24 +43,16 @@ eureka:
...
@@ -33,24 +43,16 @@ eureka:
# prefer-ip-address: true
# prefer-ip-address: true
# instance-id: ${spring.application.name}:${server.port}
# instance-id: ${spring.application.name}:${server.port}
# hostname: localhost
# hostname: localhost
liquidnet
:
logfile
:
path
:
/logfile
name
:
liquidnet-eureka-server.log
logging
:
logging
:
config
:
classpath:logback-spring.xml
file
:
path
:
${liquidnet.logfile.path}
name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
#logging:
max-size
:
200MB
# file:
pattern
:
# name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}
file
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{96}:%line]
-
%msg%n'
# level:
console
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{96}:%line]
-
%msg%n'
# root: info
rolling-file-name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
# #以下是为指定包设置日志级别
level
:
# com:
root
:
info
# liquidnet:
#以下是为指定包设置日志级别
# stellar:
com.liquidnet
:
${liquidnet.logfile.level}
# controller: info
## pattern:
## console: %d{yyyy/MM/dd-HH:mm:ss} [%thread] %-5level %logger- %msg%n
## file: %d{yyyy/MM/dd-HH:mm} [%thread] %-5level %logger- %msg%n
liquidnet-bus-support/liquidnet-support-eureka/src/main/resources/logback-spring.xml
deleted
100644 → 0
View file @
9b2309c0
<?xml version="1.0" encoding="UTF-8"?>
<!-- 日志级别从低到高分为TRACE < DEBUG < INFO < WARN < ERROR < FATAL,如果设置为WARN,则低于WARN的信息都不会输出 -->
<!-- scan:当此属性设置为true时,配置文件如果发生改变,将会被重新加载,默认值为true -->
<!-- scanPeriod:设置监测配置文件是否有修改的时间间隔,如果没有给出时间单位,默认单位是毫秒。当scan为true时,此属性生效。默认的时间间隔为1分钟。 -->
<!-- debug:当此属性设置为true时,将打印出logback内部日志信息,实时查看logback运行状态。默认值为false。 -->
<configuration
scan=
"true"
scanPeriod=
"10 seconds"
>
<!--<include resource="org/springframework/boot/logging/logback/base.xml" />-->
<contextName>
logback
</contextName>
<!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 -->
<property
name=
"log.path"
value=
"./logs/eureka/"
/>
<!-- 彩色日志 -->
<!-- 彩色日志依赖的渲染类 -->
<conversionRule
conversionWord=
"clr"
converterClass=
"org.springframework.boot.logging.logback.ColorConverter"
/>
<conversionRule
conversionWord=
"wex"
converterClass=
"org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"
/>
<conversionRule
conversionWord=
"wEx"
converterClass=
"org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"
/>
<!-- 彩色日志格式 -->
<property
name=
"CONSOLE_LOG_PATTERN"
value=
"${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"
/>
<!--输出到控制台-->
<appender
name=
"CONSOLE"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<!--此日志appender是为开发使用,只配置最底级别,控制台输出的日志级别是大于或等于此级别的日志信息-->
<filter
class=
"ch.qos.logback.classic.filter.ThresholdFilter"
>
<level>
info
</level>
</filter>
<encoder>
<Pattern>
${CONSOLE_LOG_PATTERN}
</Pattern>
<!-- 设置字符集 -->
<charset>
UTF-8
</charset>
</encoder>
</appender>
<!--输出到文件-->
<!-- 时间滚动输出 level为 DEBUG 日志 -->
<appender
name=
"DEBUG_FILE"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<!-- 正在记录的日志文件的路径及文件名 -->
<file>
${log.path}/log_debug.log
</file>
<!--日志文件输出格式-->
<encoder>
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
</pattern>
<charset>
UTF-8
</charset>
<!-- 设置字符集 -->
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 日志归档 -->
<fileNamePattern>
${log.path}/debug/log-debug-%d{yyyy-MM-dd}.%i.log
</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
100MB
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<maxHistory>
15
</maxHistory>
</rollingPolicy>
<!-- 此日志文件只记录debug级别的 -->
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
debug
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<!-- 时间滚动输出 level为 INFO 日志 -->
<appender
name=
"INFO_FILE"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<!-- 正在记录的日志文件的路径及文件名 -->
<file>
${log.path}/log_info.log
</file>
<!--日志文件输出格式-->
<encoder>
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
</pattern>
<charset>
UTF-8
</charset>
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天日志归档路径以及格式 -->
<fileNamePattern>
${log.path}/info/log-info-%d{yyyy-MM-dd}.%i.log
</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
100MB
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<maxHistory>
15
</maxHistory>
</rollingPolicy>
<!-- 此日志文件只记录info级别的 -->
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
info
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<!-- 时间滚动输出 level为 WARN 日志 -->
<appender
name=
"WARN_FILE"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<!-- 正在记录的日志文件的路径及文件名 -->
<file>
${log.path}/log_warn.log
</file>
<!--日志文件输出格式-->
<encoder>
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
</pattern>
<charset>
UTF-8
</charset>
<!-- 此处设置字符集 -->
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<fileNamePattern>
${log.path}/warn/log-warn-%d{yyyy-MM-dd}.%i.log
</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
100MB
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<maxHistory>
15
</maxHistory>
</rollingPolicy>
<!-- 此日志文件只记录warn级别的 -->
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
warn
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<!-- 时间滚动输出 level为 ERROR 日志 -->
<appender
name=
"ERROR_FILE"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<!-- 正在记录的日志文件的路径及文件名 -->
<file>
${log.path}/log_error.log
</file>
<!--日志文件输出格式-->
<encoder>
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
</pattern>
<charset>
UTF-8
</charset>
<!-- 此处设置字符集 -->
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<fileNamePattern>
${log.path}/error/log-error-%d{yyyy-MM-dd}.%i.log
</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
100MB
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<maxHistory>
15
</maxHistory>
</rollingPolicy>
<!-- 此日志文件只记录ERROR级别的 -->
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
ERROR
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<!--
<logger>用来设置某一个包或者具体的某一个类的日志打印级别、
以及指定<appender>。<logger>仅有一个name属性,
一个可选的level和一个可选的addtivity属性。
name:用来指定受此logger约束的某一个包或者具体的某一个类。
level:用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF,
还有一个特俗值INHERITED或者同义词NULL,代表强制执行上级的级别。
如果未设置此属性,那么当前logger将会继承上级的级别。
addtivity:是否向上级logger传递打印信息。默认是true。
-->
<!--<logger name="org.springframework.web" level="info"/>-->
<!--<logger name="org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor" level="INFO"/>-->
<!--
使用mybatis的时候,sql语句是debug下才会打印,而这里我们只配置了info,所以想要查看sql语句的话,有以下两种操作:
第一种把<root level="info">改成<root level="DEBUG">这样就会打印sql,不过这样日志那边会出现很多其他消息
第二种就是单独给dao下目录配置debug模式,代码如下,这样配置sql语句会打印,其他还是正常info级别:
-->
<!--
root节点是必选节点,用来指定最基础的日志输出级别,只有一个level属性
level:用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF,
不能设置为INHERITED或者同义词NULL。默认是DEBUG
可以包含零个或多个元素,标识这个appender将会添加到这个logger。
-->
<!--开发环境:打印控制台-->
<springProfile
name=
"dev"
>
<logger
name=
"com.liquidnet"
level=
"debug"
/>
</springProfile>
<root
level=
"info"
>
<appender-ref
ref=
"CONSOLE"
/>
<appender-ref
ref=
"DEBUG_FILE"
/>
<appender-ref
ref=
"INFO_FILE"
/>
<appender-ref
ref=
"WARN_FILE"
/>
<appender-ref
ref=
"ERROR_FILE"
/>
</root>
<!--生产环境:输出到文件-->
<!--<springProfile name="pro">-->
<!--<root level="info">-->
<!--<appender-ref ref="CONSOLE" />-->
<!--<appender-ref ref="DEBUG_FILE" />-->
<!--<appender-ref ref="INFO_FILE" />-->
<!--<appender-ref ref="ERROR_FILE" />-->
<!--<appender-ref ref="WARN_FILE" />-->
<!--</root>-->
<!--</springProfile>-->
</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