Fix logging in settings.py