old_contents: from .base import *
  import dj_database_url
  
  DEBUG = False
  TEMPLATE_DEBUG = DEBUG
  
  ADMINS = (
  )
  
  DATABASES = {'default': dj_database_url.config()}
  
  LOGGING['root'] = {
              'level': 'WARNING',
              'handlers': ['opbeat']}
  LOGGING['loggers']['opbeat'] = {
              'level': 'DEBUG',
              'handlers': ['console'],
              'propagate': False}
  LOGGING['loggers']['opbeat.errors'] = {
              'level': 'DEBUG',
              'handlers': ['console'],
              'propagate': False}
  
  LOGGING['handlers']['log_file']['filename'] = ''
  
  # Honor the 'X-Forwarded-Proto' header for request.is_secure()
  SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
  
  # Allow all host headers
  ALLOWED_HOSTS = ['*']
new_contents: from .base import *
  import dj_database_url
  
  DEBUG = False
  TEMPLATE_DEBUG = DEBUG
  
  ADMINS = (
  )
  
  DATABASES = {'default': dj_database_url.config()}
  
  LOGGING = {
      'version': 1,
      'disable_existing_loggers': True,
      'filters': {
       'require_debug_false': {
           '()': 'django.utils.log.RequireDebugFalse'
       }},
      'formatters': {
          'verbose': {
              'format': '%(levelname)s %(asctime)s %(module)s '
                        '%(process)d %(thread)d %(message)s'
          },
          'simple': {
              'format': '%(levelname)s %(message)s'
          },
      },
      'handlers': {
          'null': {
              'level':'DEBUG',
              'class':'django.utils.log.NullHandler',
              },
          'console': {
              'level': 'DEBUG',
              'class': 'logging.StreamHandler',
              'formatter': 'verbose'
          },
          'mail_admins': {
              'level': 'ERROR',
              'filters': ['require_debug_false'],
              'class': 'django.utils.log.AdminEmailHandler'
          }
      },
      'loggers': {
          'django': {
              'handlers': ['console', 'mail_admins'],
              'level': 'DEBUG',
              'propagate': True,
              },
          'django.request': {
              'handlers': ['console', 'mail_admins'],
              'level': 'ERROR',
              'propagate': False,
              },
          'django.db.backends': {
              'handlers': ['console', 'mail_admins'],
              'level': 'INFO',
              'propagate': False,
              },
          # Catch All Logger -- Captures any other logging
          '': {
              'handlers': ['console', 'mail_admins'],
              'level': 'DEBUG',
              'propagate': True,
              }
      }
  }
  
  # Honor the 'X-Forwarded-Proto' header for request.is_secure()
  SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
  
  # Allow all host headers
  ALLOWED_HOSTS = ['*']
subject: fix the prod logging issue