vishalanandl177 / DRF-API-Logger

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

Maximum request and response body size #74

Closed mowiwi closed 12 months ago

mowiwi commented 1 year ago

Request/Response bodies By default, DRF API LOGGER will save down the request and response bodies for each request for future viewing no matter how large. If DRF API LOGGER is used in production under heavy volume with large bodies this can have a huge impact on space/time performance.

This behaviour can be configured with the following options additional:

DRF_API_LOGGER_MAX_REQUEST_BODY_SIZE = -1 # DRF API LOGGER takes anything <0 as no limit DRF_API_LOGGER_MAX_RESPONSE_BODY_SIZE = 1024 # If response body>1024 bytes, ignore. Instead of an response, write, for example, "..."

vishalanandl177 commented 1 year ago

@mowiwi Sure I'll work on this feature.

vishalanandl177 commented 12 months ago

Fixes are available on version 1.1.15.