logging sql queries during unit test

2012-01-03 Thread Brian Craft
Is overwriting settings.DEBUG the recommended way to get connections[db].queries to work during a unit test? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from

Re: Logging SQL queries

2011-05-24 Thread Shawn Milochik
On 05/24/2011 03:25 PM, candlerb wrote: Thank you. I tried this and it still didn't log my SQL queries. Then I went through the documentation again, and found that I should have configured "django.db.backends" instead of "django.db.backend". It's working now. Sorry for the noise - it would have

Re: Logging SQL queries

2011-05-24 Thread candlerb
On May 24, 5:28 pm, Shawn Milochik wrote: > Here's a handler: ... > Here's a logger: Thank you. I tried this and it still didn't log my SQL queries. Then I went through the documentation again, and found that I should have configured "django.db.backends" instead of

Re: Logging SQL queries

2011-05-24 Thread Shawn Milochik
I recommend logging to a file. Here's a handler: 'django_log_file': { 'level': 'DEBUG', 'class': 'logging.handlers.RotatingFileHandler', 'filename': '/tmp/myproject_django.log', 'formatter': 'verbose', 'backupCount': 50,

Logging SQL queries

2011-05-24 Thread candlerb
I have Django 1.3 installed, and would like the built-in 'runserver' to show me the SQL queries it is executing. I found this thread: http://groups.google.com/group/django-users/browse_thread/thread/9ed3ea72afc02ee8/a5df8c062640d063?show_docid=a5df8c062640d063=1=1 However, after reading the