Yes, you can quiet the sql logging down by assigning a 'null handler' to the logger named 'django.db.backends'. I assume you use django's new dict-based logging setup? If so, this snippet ought to make it easy:
...
'handlers': {
'null': {
'level': 'DEBUG',
'class':'logging.NullHandler',
},
...
'loggers': {
... your regular logger 'root' or '' ....
'django.db.backends': {
'handlers': ['null'], # Quiet by default!
'propagate': False,
'level':'DEBUG',
},
...
Update: look at Brian's answer, too. I understood "logging" to mean the irritating logging of every sql statement. Brian talks about the internal memory logging of every query (and I guess he's right :-)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…