"""
Django settings for transtats project - test env.

Generated by 'django-admin startproject' using Django 1.9.5.

For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""

from .base import *
from .auth import *


# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False

# Email Backend
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'

# Allowed Hosts
ALLOWED_HOSTS = ['*']

LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,
    'formatters': {
        'standard': {
            'format': '%(asctime)s [%(levelname)s] %(name)s: %(message)s'
        },
    },
    'filters': {
        'require_debug_false': {
            '()': 'django.utils.log.RequireDebugFalse'
        },
        'require_debug_true': {
            '()': 'django.utils.log.RequireDebugTrue',
        },
    },
    'handlers': {
        'null': {
            'level': 'ERROR',
            'class': 'logging.NullHandler',
        },
        'console': {
            'level': 'ERROR',
            'class': 'logging.StreamHandler',
            'formatter': 'standard',
        },
        'app': {
            'level': 'ERROR',
            'class': 'logging.handlers.RotatingFileHandler',
            'filename': os.path.join(BASE_DIR, 'logs/app.log'),
            'maxBytes': 1024 * 1024 * 5,
            'backupCount': 5,
            'formatter': 'standard',
        },
        'db': {
            'level': 'ERROR',
            'class': 'logging.handlers.RotatingFileHandler',
            'filename': os.path.join(BASE_DIR, 'logs/db.log'),
            'maxBytes': 1024 * 1024 * 5,
            'backupCount': 5,
            'formatter': 'standard',
        },
        'django': {
            'level': 'ERROR',
            'class': 'logging.handlers.RotatingFileHandler',
            'filename': os.path.join(BASE_DIR, 'logs/django.log'),
            'maxBytes': 1024 * 1024 * 5,
            'backupCount': 5,
            'formatter': 'standard',
        }
    },
    'loggers': {
        'django': {
            'handlers': ['django'],
            'level': 'ERROR',
            'propagate': False,
        },
        'django.db': {
            'handlers': ['db'],
            'level': 'ERROR',
            'propagate': False,
        },
        '': {
            'handlers': ['app'],
            'level': 'ERROR',
            'propagate': True,
        },
        'django.request': {
            'handlers': ['app', 'console'],
            'level': 'ERROR',
            'propagate': True,
        },
    }
}

@@ -1543,297 +1543,8 @@
  %7D,%0A
-        'db': %7B%0A            'level': 'ERROR',%0A            'class': 'logging.handlers.RotatingFileHandler',%0A            'filename': os.path.join(BASE_DIR, 'logs/db.log'),%0A            'maxBytes': 1024 * 1024 * 5,%0A            'backupCount': 5,%0A            'formatter': 'standard',%0A        %7D,%0A
     
@@ -1992,136 +1992,8 @@
  %7D,%0A
-        'django.db': %7B%0A            'handlers': %5B'db'%5D,%0A            'level': 'ERROR',%0A            'propagate': False,%0A        %7D,%0A
     

disable db logs