File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,18 @@ You can log only selected responses by specifying `DRF_API_LOGGER_STATUS_CODES`
195
195
DRF_API_LOGGER_STATUS_CODES = [200 , 400 , 404 , 500 ] # Default to an empty list (Log all responses).
196
196
```
197
197
198
+ ### Want to log custom content types? (Optional)
199
+ You can log custom content types by specifying ` DRF_API_LOGGER_CONTENT_TYPES ` in settings.py.
200
+ The specified content types will be added alongside with default content types.
201
+ ``` python
202
+ DRF_API_LOGGER_CONTENT_TYPES = [
203
+ " application/json" ,
204
+ " application/vnd.api+json" ,
205
+ " application/gzip" ,
206
+ " application/octet-stream" ,
207
+ ] # Default content types.
208
+ ```
209
+
198
210
### Want to see the API information in the local timezone? (Optional)
199
211
You can also change the timezone by specifying ` DRF_API_LOGGER_TIMEDELTA ` in settings.py.
200
212
It won't change the Database timezone. It will remain UTC or the timezone you have defined.
@@ -203,7 +215,7 @@ DRF_API_LOGGER_TIMEDELTA = 330 # UTC + 330 Minutes = IST (5:Hours, 30:Minutes ah
203
215
# Specify in minutes.
204
216
```
205
217
``` python
206
- # Yoc can specify negative values for the countries behind the UTC timezone.
218
+ # You can specify negative values for the countries behind the UTC timezone.
207
219
DRF_API_LOGGER_TIMEDELTA = - 30 # Example
208
220
```
209
221
You can’t perform that action at this time.
0 commit comments