Add option to log headers to AbstractRequestLoggingFilter [SPR-14245] #18818
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
Milestone
Uh oh!
There was an error while loading. Please reload this page.
M. Justin opened SPR-14245 and commented
AbstractRequestLoggingFilter has options to include the query string and the payload. It would be nice if it also had a standard option to log the request headers.
The rationale here is that sometimes it is helpful or necessary to know what the request headers were in order to troubleshoot an issue.
A workaround is to override the "createMessage" method to append the header information:
Note though that since the name of the logger that is used is based on the name of the class, the logging configuration has to be set to log the new subclass to DEBUG, not e.g. CommonsRequestLoggingFilter.
Issue Links:
The text was updated successfully, but these errors were encountered: