Problem/Motivation
Sometimes items which would have been expected to be queued do not appear to be. In order to be able to track down such issues, it would be helpful to know which Edit-since and Edit-to timestamps were used, and what other criteria were used in the query.
This might also require a feature request/change to the orange-dam-php library, depending on implementation.
Proposed resolution
The only way to log the complete request would be for the client library to either 1) store the request into a ->lastRequest property which can then be retrieved for logging or 2) Add it to the response object (which would possibly require overriding Guzzle HTTP's Response class).
An alternative implementation would be to not get all the information about the final request but simply log out the query parameters that were used.
Remaining tasks
Decide on approach. If a change is needed to the orange-dam-php library, a feature request and changeset should be logged there. If we decide to simply log the query parameters, then I think all we need is to add a log statement after the request is made.
User interface changes
None.
API changes
None to the orange_dam module. But possibly a new method added to the Endpoint class in the orange-dam-php library.
Data model changes
None.
Issue fork orange_dam-3476559
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
apotek commentedA change request has been logged against the orange-dam-php library.
Comment #4
apotek commentedComment #5
apotek commentedThe merge request provided does not actually implement the logging. Given the complexity (and enormity) of the request parameters, it is highly unlikely that whatever the maintainers would choose to log would not suit many.
The better option here, then, is to dispatch a Response event and allow users of this module to write an EventSubscriber that listens for the api response event and then log whatever data they wish, as they see fit.
Comment #8
apotek commentedComment #9
apotek commented