mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 23:57:12 +08:00
完善日志系统
This commit is contained in:
@@ -98,6 +98,7 @@ logging:
|
||||
max-file-size: 100MB
|
||||
clean-history-on-start: true
|
||||
max-history: 7
|
||||
config: classpath:logback-spring.xml
|
||||
springdoc:
|
||||
swagger-ui:
|
||||
enabled: false
|
||||
|
||||
16
src/main/resources/logback-spring.xml
Normal file
16
src/main/resources/logback-spring.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<springProperty scope="context" name="app" source="spring.application.name"
|
||||
defaultValue="spring"/>
|
||||
|
||||
<springProperty scope="context" name="profile" source="spring.profiles.active" defaultValue="default"/>
|
||||
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
|
||||
<property name="LOG_FILE" value="${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}}/${app}-${profile}.log"/>
|
||||
<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>
|
||||
<include resource="org/springframework/boot/logging/logback/file-appender.xml"/>
|
||||
<root level="INFO">
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
<appender-ref ref="FILE"/>
|
||||
</root>
|
||||
<logger name="org.springframework.web" level="DEBUG"/>
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user