1π
β
The logging configuration is in settings.py.
Here is the documentation with some examples: Django logging config β examples
In your case, you have to add something like
'loggers': {
'django.db.backends': {
'handlers': ['console'],
'filters': ['SQLStatementsFilter'],
},
This is not the full config and please check the documentation. The idea is to implement a filter that will filter all unwanted log messages only for all classes in the django.db.backends
module (and submodules).
π€Andreas Dolk
Source:stackexchange.com