Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable south debug logging in django?

When I run my tests in Django, after a fail I got several pages of debug output from South, like these:

south: DEBUG: south execute "CREATE INDEX "sometable_4d5bad5" ON "video_playable" ("network_id");" with params "[]"
south: DEBUG: south execute "CREATE INDEX "sometable_790e6d98" ON "video_playable" ("published");" with params "[]"
south: DEBUG: south execute "CREATE INDEX "sometable_72312277" ON "video_playable" ("archived");" with params "[]"

And with all this logging output, the relevant error messages are lost in a sea of garbage. Is there a way to disable this ouput?

like image 253
lfagundes Avatar asked Dec 20 '11 15:12

lfagundes


1 Answers

Put this somewhere in your code. I have it in myapp/migrations/__init__.py

import logging
south_logger=logging.getLogger('south')
south_logger.setLevel(logging.INFO)
like image 123
guettli Avatar answered Sep 20 '22 16:09

guettli