-
Notifications
You must be signed in to change notification settings - Fork 263
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
POST request body not being logged in Spring Boot #382
Comments
Seems like the problem only exists for |
Yes, due to the way the Servlet API spec treats |
Thanks for replying @whiskeysierra. As mentioned above in the description, I've tried setting the |
Can you create a minimal project to reproduce the issue? |
Created a spring boot project here @whiskeysierra : |
|
Thank you. Didn't pay attention to the system property line when I used it from the Logbook Readme. Perhaps you can explicitly mention |
Would you mind creating a pull request?
…On Fri, Nov 9, 2018, 10:01 Yashveer Rana ***@***.*** wrote:
Thank you. Didn't pay attention to the system property line when I used it
from the Logbook Readme. Perhaps you can explicitly mention
-Dlogbook.servlet.form-request=parameter to avoid such things in future.
Closing the issue
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#382 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAaPneQzehK2ETfOztJP4-NfomCkZx4tks5utURpgaJpZM4YQYOZ>
.
|
Description
I'm using the logbook-spring-boot-starter package with Spring Boot 2.0.5.RELEASE.
As per the docs, I've set
logging.level.org.zalando.logbook=TRACE
property inapplication.properties
It logs all request/response as expected, however does not print the body of POST Requests with content type :
application/x-www-form-urlencoded
The Readme says that since Logbook 1.5.0, we can set the strategy for logging the request body. I've even tried setting that, experimenting with all values for the property
logbook.servlet.form-request
, but it still doesn't work.I did some debugging and looked up JsonHttpLogFormatter class. In the addBody method, the
message.getBodyAsString()
for the HttpMessage is empty, due to which the key doesn't get printed in the output.Also attaching a sample curl request -
And its corresponding generated log via Logbook
Your Environment
The text was updated successfully, but these errors were encountered: