Problem/Motivation
The module label is jsonapi_request_logger and subscribes to an onKernelRequest event, but the log template includes status_code that won't be available until a response is handled, e.g. via onKernelResponse
Steps to reproduce
Make a JSONAPI request, note that Status is logged as N/A
Proposed resolution
Offer an option to subscribe to and log Response so that HTTP code is available.
Issue fork jsonapi_request_logger-3485175
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
dcimorraComment #3
lapaty commentedComment #5
lapaty commentedComment #7
dcimorraThank you for your contribution.
The proposed solution is adapted to what was requested in the incident, providing new functionalities such as the log output format.
From now on, the EventSubscriber attends OnKernelRequest and OnKernelResponse events, to provide as much data as possible in the logs.
Once again, thank you very much.
Comment #8
dcimorraComment #9
dcimorra