Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-csf
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xingmin
yd-csf
Commits
4f0192fe
Commit
4f0192fe
authored
Jun 05, 2026
by
zhangxingmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
82ca50a4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
yd-csf-api/src/main/resources/logback-spring.xml
+36
-0
No files found.
yd-csf-api/src/main/resources/logback-spring.xml
0 → 100644
View file @
4f0192fe
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!-- 输出到控制台(可保留) -->
<appender
name=
"CONSOLE"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<encoder>
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
</pattern>
</encoder>
</appender>
<!-- 慢 SQL 专用文件 -->
<appender
name=
"SLOW_SQL_FILE"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
logs/slow-sql.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<fileNamePattern>
logs/slow-sql.%d{yyyy-MM-dd}.%i.log
</fileNamePattern>
<maxHistory>
30
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
100MB
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
</pattern>
</encoder>
</appender>
<!-- 关键:将 druid.sql.Statement 的日志输出到慢 SQL 文件(级别 INFO 即可打印慢 SQL) -->
<logger
name=
"druid.sql.Statement"
level=
"INFO"
additivity=
"false"
>
<appender-ref
ref=
"SLOW_SQL_FILE"
/>
<!-- 如果还想在控制台看到慢 SQL,可以再加 CONSOLE -->
<!-- <appender-ref ref="CONSOLE" /> -->
</logger>
<root
level=
"INFO"
>
<appender-ref
ref=
"CONSOLE"
/>
</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