DRF-API-Logger icon indicating copy to clipboard operation
DRF-API-Logger copied to clipboard

Don't write response with method get

Open laugrean opened this issue 2 years ago • 2 comments

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!

laugrean avatar Sep 29 '22 07:09 laugrean

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.

vishalanandl177 avatar Sep 29 '22 07:09 vishalanandl177

Thank you for your feedback.

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

laugrean avatar Sep 29 '22 11:09 laugrean

It already supports all the methods.

vishalanandl177 avatar Dec 16 '22 17:12 vishalanandl177

Closing due to inactivity.

vishalanandl177 avatar Jan 18 '23 17:01 vishalanandl177