Disable south debug logging when testing apps with nose in django

If you’re testing your apps using django-nose and if you have the south database migration app installed, you will notice a high amount of debug messages in the terminal coming from south. This is because south itself sets the level of logging to debug. Unfortunately the south developers are currently not willing to change that.

To silence south, you can write a little nose-plugin, which sets the logging level of south from DEBUG to a level of your choice (e.g. ERROR). To achieve that, simply create a new python module containing the plugin:


from nose.plugins import Plugin
import logging

class SilenceSouth(Plugin):
    south_logging_level = logging.ERROR
    def configure(self, options, conf):
        super(SilenceSouth, self).configure(options, conf)

You can put nose_plugin.py anywhere in your project folder. In the second step you have to tell nose to use that plugin, and where it is located. To do this, simply add the following lines to the settings.py of your project:



The result: no more annoying debug messages from south during testing.


3 thoughts on “Disable south debug logging when testing apps with nose in django

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s