File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -183,4 +183,28 @@ Congratulations, your project is ready to go!
183
183
184
184
## Troubleshooting
185
185
186
- TODO
186
+ ### Debug logging
187
+
188
+ To troubleshoot MongoDB connectivity issues, you can enable [ PyMongo's logging] (
189
+ https://pymongo.readthedocs.io/en/stable/examples/logging.html ) using
190
+ [ Django's ` LOGGING ` setting] ( https://docs.djangoproject.com/en/stable/topics/logging/ ) .
191
+
192
+ This is a minimal ` LOGGING ` setting that enables PyMongo's ` DEBUG ` logging:
193
+
194
+ ``` python
195
+ LOGGING = {
196
+ " version" : 1 ,
197
+ " disable_existing_loggers" : False ,
198
+ " handlers" : {
199
+ " console" : {
200
+ " class" : " logging.StreamHandler" ,
201
+ },
202
+ },
203
+ " loggers" : {
204
+ " pymongo" : {
205
+ " handlers" : [" console" ],
206
+ " level" : " DEBUG" ,
207
+ },
208
+ },
209
+ }
210
+ ```
You can’t perform that action at this time.
0 commit comments