inveniosoftware / invenio-records-rest

Invenio records REST API module.
https://invenio-records-rest.readthedocs.io
MIT License
4 stars 63 forks source link

Logging of request to elasticsearch and the response #236

Closed PSvishnu93 closed 5 years ago

PSvishnu93 commented 5 years ago

Is there any way to log the request to elasticsearch and the response or the request to invenio_records_rest and its response from a flask API

lnielsen commented 5 years ago

Today there is not, but you can probably hack it in.

The search object is generated by a user-configurable factory (see https://github.com/inveniosoftware/invenio-records-rest/blob/master/invenio_records_rest/views.py#L529-L533). This means you subclass the execute method and implement the logging there.