sonoerin
sonoerin

Reputation: 5185

Spring Boot AWS logging level

I have several Spring Boot micro services that connect to Config Server and Eureka. All are running inside Docker container in ECS. They are very chatty and I would like to eliminate the non-critical messages.

2023-01-06 16:42:03.426 WARN 1 --- [tbeatExecutor-0] c.n.d.s.t.d.RetryableEurekaHttpClient : Request execution failed with message... 2023-01-06 16:43:28.082 INFO 1 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration... 2023-01-06 16:50:03.679 INFO 1 --- [freshExecutor-0] o.apache.http.impl.execchain.RetryExec... 2023-01-06 16:42:03.426 INFO 1 --- [tbeatExecutor-0] c.n.d.s.t.d.RedirectingEurekaHttpClient...

And each service has its application.properties file with the following:

logging.level.org.springframework.cloud.netflix.eureka.http=FATAL logging.level.com.netflix.discovery=FATAL logging.level.com.netflix.discovery.shared.resolver.aws = ERROR logging.level.com.netflix.eureka.registry = ERROR logging.level.org.springframework.web.servlet = FATAL logging.level.org.hibernate = ERROR logging.level.com.zaxxer.hikari = ERROR logging.level.org.apache.tomcat=ERROR logging.level.org.apache.catalina=ERROR

But the messages continue to show up in the log files. I don't get why this is, since those messages are INFO and WARN.

Upvotes: 0

Views: 395

Answers (1)

ozkanpakdil
ozkanpakdil

Reputation: 4632

In order to disable below error messages use the config below

logging.level.com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient=error

also in your config I see logging.level.org.springframework.web.servlet = FATAL logging.level.org.hibernate = this looks wrong, every line should have one gorup name = something, then new line.

Upvotes: 1

Related Questions