Blog

spring boot で ExceptionLoggingFilter が ERROR level でログ出まくってうざいってとき

spring-cloud-sleuth を依存にいれたら ERROR レベルでのログの出方がおかしくなった。

https://github.com/spring-cloud/spring-cloud-sleuth/blob/master/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/instrument/web/ExceptionLoggingFilter.java

このクラスが例外をキャッチしてエラーログに書いて rethrow するという謎の挙動をしている。。

なんのためにいったいこのクラスが設定されているのか謎。だが。。

https://cloud.spring.io/spring-cloud-sleuth/multi/multi__integrations.html#_http_filter

この spring.sleuth.web.exception-throwing-filter-enabled プロパティを false に設定することですべてが解決する。


It's fixed by this PR. https://github.com/spring-cloud/spring-cloud-sleuth/pull/1633