Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
HaiNaAIFaceToFace
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
霍传世
HaiNaAIFaceToFace
Commits
c4d10004
Commit
c4d10004
authored
Feb 06, 2025
by
霍传世
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
控制台日志存储级别设置
parent
dc6a2eaf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
5 deletions
+40
-5
pom.xml
pom.xml
+5
-2
src/main/resources/application.properties
src/main/resources/application.properties
+1
-3
src/main/resources/logback-spring.xml
src/main/resources/logback-spring.xml
+34
-0
No files found.
pom.xml
View file @
c4d10004
...
...
@@ -85,13 +85,11 @@
<artifactId>
cos-sts_api
</artifactId>
<version>
3.1.0
</version>
</dependency>
<dependency>
<groupId>
org.apache.logging.log4j
</groupId>
<artifactId>
log4j-api
</artifactId>
<version>
2.17.1
</version>
</dependency>
<dependency>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi-ooxml
</artifactId>
...
...
@@ -111,6 +109,11 @@
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
</plugins>
<resources>
<resource>
<directory>
src/main/resources
</directory>
</resource>
</resources>
</build>
<repositories>
<repository>
...
...
src/main/resources/application.properties
View file @
c4d10004
...
...
@@ -20,7 +20,5 @@ spring.datasource.hikari.minimum-idle=5
spring.datasource.hikari.maximum-pool-size
=
10
spring.datasource.hikari.idle-timeout
=
30000
# Spring Boot ??????
logging.level.root
=
INFO
logging.file.name
=
logs/application.log
logging.pattern.console
=
%d{yyyy-MM-dd HH:mm:ss} - %level - %logger{36} - %msg%n
logging.config
=
classpath:logback-spring.xml
src/main/resources/logback-spring.xml
0 → 100644
View file @
c4d10004
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!-- 设置全局日志级别 -->
<logger
name=
"org.springframework"
level=
"INFO"
/>
<logger
name=
"com.yuda.hainafacetofaceai"
level=
"INFO"
/>
<!-- Console Appender 配置 -->
<appender
name=
"CONSOLE"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<encoder>
<pattern>
[%d{yyyy-MM-dd HH:mm:ss}]--[%thread]-%-5level--[logger->%logger{20}]--[method->%method,%line]---%msg%n
</pattern>
</encoder>
</appender>
<!-- File Appender 配置,定义日志文件滚动策略 -->
<appender
name=
"FILE"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
logs/HaiNaFace.log
</file>
<!-- 滚动策略 -->
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 文件名称模式,%d{yyyy-MM-dd} 表示按日期滚动 -->
<FileNamePattern>
logs/HaiNAFace-%d{yyyy-MM-dd}.log
</FileNamePattern>
<!-- 设置保留日志的最大天数,保留60天的日志 -->
<maxHistory>
60
</maxHistory>
<!-- 可选: 设置日志文件最大大小 -->
<totalSizeCap>
5GB
</totalSizeCap>
<!-- 可根据需要调整 -->
</rollingPolicy>
<!-- 输出格式 -->
<encoder>
<pattern>
[%d{yyyy-MM-dd HH:mm:ss}]--[%thread]-%-5level--[logger->%logger{20}]--[method->%method,%line]---%msg%n
</pattern>
</encoder>
</appender>
<!-- 根日志配置 -->
<root
level=
"INFO"
>
<appender-ref
ref=
"CONSOLE"
/>
<appender-ref
ref=
"FILE"
/>
</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