Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
customer-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
QG
customer-service
Commits
49f77d5f
Commit
49f77d5f
authored
Nov 04, 2019
by
xiaozhe.chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加初始版本客服系统代码
parent
59ea2583
Pipeline
#295
failed with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
25 deletions
+24
-25
logback-dev.xml
src/main/resources/logback-dev.xml
+12
-15
logback-pro.xml
src/main/resources/logback-pro.xml
+12
-10
No files found.
src/main/resources/logback-dev.xml
View file @
49f77d5f
<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
<springProperty
name=
"spring.application.name"
source=
"spring.application.name"
/>
<property
name=
"LOG_LEVEL_PATTERN"
value=
"%
5p [${spring.application.name:-},%X{X-B3-TraceId:-},%X{X-B3-SpanId:-},%X{X-Span-Export:-}]
"
/>
<property
name=
"
FILE_LOG_PATTERN"
value=
"${FILE_LOG_PATTERN:-%d{yyyy-MM-dd HH:mm:ss.SSS} ${LOG_LEVEL_PATTERN:-%5p} --- [%thread] [%file:%line] %logger - %msg%n
}"
/>
<property
name=
"LOG_LEVEL_PATTERN"
value=
"%
clr(%5p) %clr([${spring.application.name:-},%X{X-B3-TraceId:-},%X{X-B3-SpanId:-},%X{X-Span-Export:-}]){yellow}
"
/>
<property
name=
"
CONSOLE_LOG_PATTERN"
value=
"${CONSOLE_LOG_PATTERN:-%clr(%d{MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%10.10t]){faint} [%40.40file:%4.4line] %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}
}"
/>
<appender
name=
"FILE"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
/home/quant_group/logs/${spring.application.name:-application}.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<fileNamePattern>
/home/quant_group/logs/${spring.application.name:-application}.log.%d{yyyy-MM-dd}
</fileNamePattern>
<maxHistory>
30
</maxHistory>
</rollingPolicy>
<encoder>
<pattern>
${FILE_LOG_PATTERN}
</pattern>
</encoder>
</appender>
<!-- 这里面定义了 CONSOLE_LOG_PATTERN, FILE_LOG_PATTERN 等日志格式, 还定义了一些日志级别 -->
<include
resource=
"org/springframework/boot/logging/logback/defaults.xml"
/>
<include
resource=
"org/springframework/boot/logging/logback/console-appender.xml"
/>
<logger
name=
"org.springframework"
level=
"warn"
/>
<logger
name=
"cn.quantgroup"
level=
"DEBUG"
/>
<logger
name=
"org.springframework"
level=
"INFO"
/>
<!--<logger name="java.sql.Connection" level="DEBUG"/>-->
<!--<logger name="java.sql.Statement" level="DEBUG"/>-->
<!--<logger name="java.sql.PreparedStatement" level="DEBUG"/>-->
<logger
name=
"org.hibernate"
level=
"warn"
/>
<logger
name=
"org.apache"
level=
"warn"
/>
<logger
name=
"ch.qos.logback"
level=
"warn"
/>
<root
level=
"
info
"
>
<appender-ref
ref=
"
FILE"
/>
<root
level=
"
INFO
"
>
<appender-ref
ref=
"
CONSOLE"
/>
</root>
</configuration>
\ No newline at end of file
src/main/resources/logback-pro.xml
View file @
49f77d5f
<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
<springProperty
name=
"spring.application.name"
source=
"spring.application.name"
/>
<property
name=
"LOG_LEVEL_PATTERN"
value=
"%5p [${spring.application.name:-},%X{X-B3-TraceId:-},%X{X-B3-SpanId:-},%X{X-Span-Export:-}]"
/>
<property
name=
"FILE_LOG_PATTERN"
value=
"${FILE_LOG_PATTERN:-%d{yyyy-MM-dd HH:mm:ss.SSS} ${LOG_LEVEL_PATTERN:-%5p} --- [%thread] [%file:%line] %logger - %msg%n}"
/>
<appender
name=
"FILE"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
/home/quant_group/logs/
credit-league
.log
</file>
<file>
/home/quant_group/logs/
${spring.application.name:-application}
.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<fileNamePattern>
/home/quant_group/logs/
credit-league
.log.%d{yyyy-MM-dd}
</fileNamePattern>
<fileNamePattern>
/home/quant_group/logs/
${spring.application.name:-application}
.log.%d{yyyy-MM-dd}
</fileNamePattern>
<maxHistory>
30
</maxHistory>
</rollingPolicy>
<
layout
class=
"ch.qos.logback.classic.PatternLayout"
>
<pattern>
%d{ISO8601} [%thread] [%-5level] %logger - %msg%n
</pattern>
</
layout
>
<
encoder
>
<pattern>
${FILE_LOG_PATTERN}
</pattern>
</
encoder
>
</appender>
<logger
name=
"org.springframework"
level=
"warn"
/>
<logger
name=
"org.
mybatis
"
level=
"warn"
/>
<logger
name=
"org.
hibernate
"
level=
"warn"
/>
<logger
name=
"org.apache"
level=
"warn"
/>
<logger
name=
"ch.qos.logback"
level=
"warn"
/>
<logger
name=
"root"
level=
"INFO"
>
<appender-ref
ref=
"FILE"
/>
</logger>
<root
level=
"INFO"
>
<root
level=
"info"
>
<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