Skip to content

Improve Servlet and Filter registration logging #15166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bclozel opened this issue Nov 13, 2018 · 0 comments
Closed

Improve Servlet and Filter registration logging #15166

bclozel opened this issue Nov 13, 2018 · 0 comments
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@bclozel
Copy link
Member

bclozel commented Nov 13, 2018

This issue is related to #13511 and #14292 - about improving the logging experience in Spring Boot.

In comment on SPR-17450, someone mentioned that the Servlet Filter registration logs are not consistent with what we've done so far:

INFO 14944 --- [           main] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
INFO 14944 --- [           main] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
INFO 14944 --- [           main] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'formContentFilter' to: [/*]
INFO 14944 --- [           main] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
INFO 14944 --- [           main] .s.DelegatingFilterProxyRegistrationBean : Mapping filter: 'springSecurityFilterChain' to: [/*]

@rstoyanchev indeed suggests to reconsider the logging level and could log everything on a single line with a map-like structure:

CharacterEncodingFilter [/*], HiddenHttpMethodFilter [/*], FormContentFilter [/*], ...

Currently we're logging that information:

  • at INFO level in AbstractFilterRegistrationBean.configure for embedded and WAR deployments
  • at DEBUG level in ServletContextInitializerBeans for embedded deployments only

I think we should remove all the above logging information and replace it with one-liners in ServletContextInitializerBeans at DEBUG level, and add that class to the web logging group.

@bclozel bclozel added type: enhancement A general enhancement for: team-attention An issue we'd like other members of the team to review labels Nov 13, 2018
@bclozel bclozel added this to the 2.1.x milestone Nov 13, 2018
@bclozel bclozel self-assigned this Nov 13, 2018
@bclozel bclozel changed the title Improve Servlet Filter registration logging Improve Servlet and Filter registration logging Nov 13, 2018
@bclozel bclozel removed the for: team-attention An issue we'd like other members of the team to review label Nov 14, 2018
@bclozel bclozel modified the milestones: 2.1.x, 2.1.1 Nov 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant