@@ -106,12 +106,13 @@ Log every request into the database. Add these lines in the Django Rest Framewor
106106 :alt: Details
107107
108108
109- Note: Make sure to migrate. It will create a table for the logger if
110- “DRF_API_LOGGER_DATABASE” is True else if already exists, it will delete
111- the table.
109+ .. note ::
110+ Make sure to migrate. It will create a table for the logger if
111+ “DRF_API_LOGGER_DATABASE” is True else if already exists, it will delete
112+ the table.
112113
113- To listen for the logger signals.
114- *********************************
114+ To listen for the logger signals
115+ ********************************
115116
116117Listen to the signal as soon as any API is called. So you can log the
117118API data into a file or for different use cases.
@@ -180,7 +181,12 @@ Specify an interval (In Seconds).
180181 .. note ::
181182 The API call time (added_on) is a timezone-aware datetime object.
182183 It is the actual time of the API call irrespective of interval value or
183- queue size. ### Skip namespace You can skip the entire app to be logged
184+ queue size.
185+
186+ Skip the namespace
187+ ==================
188+
189+ Skip namespace You can skip the entire app to be logged
184190 into the database by specifying the namespace of the app as a list.
185191
186192.. code :: python
@@ -203,11 +209,11 @@ Hide Sensitive Data From Logs
203209
204210You may wish to hide sensitive information from being exposed in the
205211logs. You do this by setting ``DRF_API_LOGGER_EXCLUDE_KEYS `` in
206- settings.py to a list of your desired sensitive keys. The default is
212+ settings.py to a list of your desired sensitive keys.
207213
208214.. code :: python
209215
210- DRF_API_LOGGER_EXCLUDE_KEYS = [' password' , ' token' , ' access' , ' refresh' ]
216+ DRF_API_LOGGER_EXCLUDE_KEYS = [' password' , ' token' , ' access' , ' refresh' ] # Default
211217 # Sensitive data will be replaced with "***FILTERED***".
212218
213219 Change the default database to store API logs
0 commit comments