我想删减我的日志为一个特定的配置文件 local
我用。
因此,我发现要设置以下属性:
logging:
level:
org:
springframework:
web: ERROR
context: ERROR
我从 local
轮廓。运行时,我希望以下语句消失:
2021-01-18 09:08:51,826 INFO [main] org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker: Bean 'org.springframework.hateoas.config.HateoasConfiguration' of type [org.springframework.hateoas.config.HateoasConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-01-18 09:08:51,829 INFO [main] org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker: Bean 'relProviderPluginRegistry' of type [org.springframework.plugin.core.support.PluginRegistryFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
不过,它们仍在渲染中。我设置的其他日志级别 debug
成功呈现 DEBUG
声明。但在这种情况下,如果我希望语句消失,它就不起作用了。
详细信息
这是我的全套衣服 application.yaml
文件:
spring:
profiles:
active: cloud
datasource:
url: jdbc:mysql:///prototype?cloudSqlInstance=${SQL_CONNECTION}&socketFactory=com.google.cloud.sql.mysql.SocketFactory&user=${SQL_USER:root}&password=${SQL_PASSWORD:root}
hikari:
maximum-pool-size: 4
server:
port: ${PORT:8080}
---
spring:
profiles:
active: local
datasource:
url: jdbc:mysql://${SQL_CONNECTION:localhost}:3306/prototype?useSSL=false&allowPublicKeyRetrieval=true
username: root
password: root
hikari:
maximum-pool-size: 4
jpa:
hibernate:
ddl-auto: update
generate-ddl: true
server:
port: 8080
logging:
level:
org:
springframework:
web: ERROR
context: ERROR
---
spring:
profiles:
active: debug
logging:
level:
com:
google:
cloud:
sql: DEBUG
org:
springframework:
boot:
autoconfigure:
jdbc: DEBUG
web: DEBUG
context: DEBUG
hibernate: DEBUG
我的 logback.xml
```
%black(%d{ISO8601}) %highlight(%-5level) [%blue(%t)] %yellow(%C{1.}): %msg%n%throwable
暂无答案!
目前还没有任何答案,快来回答吧!