vishalanandl177 / DRF-API-Logger

An API Logger for your Django Rest Framework project.
https://github.com/vishalanandl177/DRF-API-Logger
Apache License 2.0
303 stars 57 forks source link

Don't write response with method get #65

Closed laugrean closed 1 year ago

laugrean commented 1 year ago

Hey,

It's not an issue, but an feature request. Is there a possibility to skip the response in case of get Method and response code 200? after one day I've got about 200MB of data overhead due to this.

I disabled now the logging for get requests.

Thank you in advance!

vishalanandl177 commented 1 year ago

Hi @laugrean You can log only limited methods and status code. DRF_API_LOGGER_METHODS = ['GET', 'POST', 'DELETE', 'PUT'] # DRF_API_LOGGER_STATUS_CODES = ['200', '400', '404', '500'] # Please let know if you face the issue again.

laugrean commented 1 year ago

Thank you for your feedback.

Is there also a plan to add additional methods like 'PATCH' ?

vishalanandl177 commented 1 year ago

It already supports all the methods.

vishalanandl177 commented 1 year ago

Closing due to inactivity.