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
Response is not getting logged for Jax-RS async apis #621
Comments
See #624 |
@whiskeysierra when can I expect the fix to be merged and released? |
I can't properly test that right now. |
I have added your fix to my demo project. I feel it looks OK, you can try it in case it helps to test. |
@whiskeysierra any update on this? |
Still struggling to write a proper test for this using Spring MVC. |
I finally found some time digging into this and rewrote the existing test to use a real web server instead of |
Fix has been released as 2.0.0-RC.7. Thanks for raising the issue! 🎉 |
I am using jax-rx async to expose rest api's. I use the @suspended annotation to get hold of the AsyncResponse object and call AsyncResponse#resume to submit the response. Logbook is logging the request by not logging the response. On debugging I realize "isLastRequest()" in the below code snippet from NormalStratergy.java always returns false.
I am using spring boot 2 auto-configuration to configure logback with defaults.
NormalStrategy.java
private void logResponse(final Correlator correlator, final RemoteRequest request, final LocalResponse response) throws IOException { if (isLastRequest(request)) { response.getWriter().flush(); correlator.write(response) } }
Demo Project : https://github.com/rohanarya/logbook-jersey-async/
Original Issue : #620
The text was updated successfully, but these errors were encountered: