You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With using Spring autoconfiguration when a custom BodyFilter is created and the BodyFilters.defaultValue() is used in it, the configuration property "logbook.write.max-body-size" is not working anymore.
This is somewhat unexpected, as there is no indication that the BodyFilters.truncate() is not a default filter.
By reading the documentation it would be assumed that the truncation is always possible (ie. part of the defaultValue() filters).
Expected Behavior
When a custom @Bean BodyFilter bodyFilter() is created and the BodyFilters.defaultValue() is part of the filters, the truncation functionality is applied.
Actual Behavior
No truncation of the body content configured by the "logbook.write.max-body-size" property is applied.
In order to prioritize the support for Logbook, we would like to check whether the old issues are still relevant.
This issue has not been updated for over a year.
Please check if it is still relevant in latest version of the Logbook.
If so, please add a descriptive comment to keep the issue open.
Otherwise, the issue will automatically be closed after a week.
This issue is still present. If a better handling is not possible or feasible, maybe a mention in the documentation could indicate that this is an unexpected behavior? eg. at the documentation for "logbook.write.max-body-size" or the @bean Bodyfilter.
Description
With using Spring autoconfiguration when a custom BodyFilter is created and the BodyFilters.defaultValue() is used in it, the configuration property "logbook.write.max-body-size" is not working anymore.
This is somewhat unexpected, as there is no indication that the BodyFilters.truncate() is not a default filter.
By reading the documentation it would be assumed that the truncation is always possible (ie. part of the defaultValue() filters).
Expected Behavior
When a custom
@Bean BodyFilter bodyFilter()
is created and the BodyFilters.defaultValue() is part of the filters, the truncation functionality is applied.Actual Behavior
No truncation of the body content configured by the "logbook.write.max-body-size" property is applied.
Possible Fix
No exact fix, but as a workaround I had to use:
Steps to Reproduce
Context
I was trying to add custom filtering to the existing filters, suddenly the logfiles were swamped by large body logs.
Your Environment
The text was updated successfully, but these errors were encountered: