如何在AWS CloudWatch中禁用调试日志

时间:2020-01-10 11:13:43

标签: java amazon-web-services spring-boot amazon-s3

我想将日志级别设置为info(使用springboot)。我通过application.properties进行了限制

logging.level.root=INFO
logging.level.org.springframework.web=INFO
logging.level.org.hibernate=ERROR 

在本地作为独立应用程序运行良好

同一应用程序在我转换为aws lambda时,没有将日志级别设置为info并获取了不需要的默认调试日志。请参阅下面的日志

10:15:35
10:15:35.140 [main] DEBUG org.springframework.context.annotation.AnnotationConfigApplicationContext - Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@77167fb7
10:15:35.140 [main] DEBUG org.springframework.context.annotation.AnnotationConfigApplicationContext - Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@77167fb7

10:15:35
10:15:35.178 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor'

10:15:35
10:15:35.560 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.context.event.internalEventListenerProcessor'

10:15:35
10:15:35.563 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.context.event.internalEventListenerFactory'

10:15:35
10:15:35.566 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor'

10:15:35
10:15:35.568 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalCommonAnnotationProcessor'

10:15:35
10:15:35.584 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'webConfigLambda'

10:15:35
10:15:35.591 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'getRestTemplate'

10:15:36
10:15:36.263 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean '

请帮助我解决此问题。

0 个答案:

没有答案
相关问题