# Path: planb/default_settings.py
# LOGGING = {
#     'version': 1,
#     'disable_existing_loggers': True,
#     'filters': {
#         'require_debug_false': {
#             '()': 'django.utils.log.RequireDebugFalse',
#         },
#         'require_debug_true': {
#             '()': 'django.utils.log.RequireDebugTrue',
#         },
#     },
#     'formatters': {
#         'simple': {
#             'format': (
#                 '%(asctime)s [planb/%(process)5d] '
#                 '[%(levelname)-3.3s] %(message)s (%(name)s)'),
#         },
#         'notime': {
#             'format': '%(name)s - %(levelname)s/%(process)s - %(message)s',
#         },
#     },
#     'handlers': {
#         'null': {
#             'level': 'DEBUG',
#             'class': 'logging.NullHandler',
#         },
#         'mail_admins_err': {
#             'level': 'ERROR',
#             'filters': ['require_debug_false'],
#             'class': 'planb.common.log2.AdminEmailHandler'  # django.utils.log
#         },
#         'mail_admins_warn': {
#             'level': 'WARNING',
#             'filters': ['require_debug_false'],
#             'class': 'planb.common.log2.AdminEmailHandler'  # django.utils.log
#         },
#         'console': {
#             'level': 'DEBUG',
#             'class': 'logging.StreamHandler',
#             'formatter': 'simple',
#             'filters': ['require_debug_true'],
#         },
#         # 'gelf': {
#         #     'class': 'graypy.GELFHandler',
#         #     'host': '10.x.x.x',
#         #     'port': 12221,
#         # },
#         'logfile': {
#             'level': 'INFO',
#             'class': 'logging.handlers.WatchedFileHandler',
#             'formatter': 'simple',
#             'filename': '/var/log/planb/core.log',
#             # Delay, so management commands don't try to open these
#             # unless they have to.
#             'delay': True,
#         },
#         'djangoqlogfile': {
#             'level': 'DEBUG',
#             'class': 'logging.handlers.WatchedFileHandler',
#             'formatter': 'simple',
#             'filename': '/var/log/planb/queue.log',
#             # Delay, so management commands don't try to open these
#             # unless they have to.
#             'delay': True,
#         },
#     },
#     'loggers': {
#         'planb': {
#             'handlers': ['console', 'logfile', 'mail_admins_err'],
#             'level': 'DEBUG',
#             'propagate': False,
#         },
#         '': {
#             'handlers': ['mail_admins_warn'],
#             'level': 'WARNING',
#         },
#         # Let all other handlers below propagate on to here so we can send mail
#         # for all WARNINGs.
#         'django-q': {
#             'handlers': ['djangoqlogfile'],
#             'level': 'DEBUG',
#         },
#         'django': {
#             'handlers': ['console'],
#         },
#         'py.warnings': {
#             'handlers': ['console'],
#         },
#     }
# }


from planb.default_settings import *  # noqa
from planb.default_settings import LOGGING  # fix flake warning
SERVER_EMAIL = 'planb@example.com'
EMAIL_SUBJECT_PREFIX = '[PlanB] '

COMPANY_NAME = 'Example Company'
COMPANY_EMAIL = 'support@example.com'

# MySQL config example:
#
# SQL> set names utf8;
# SQL> create database planb;
# SQL> grant all on planb.* to planb identified by 'FIXMEFIXMEFIXME';

DATABASES = {
    'default': {
        # Choose 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'FIXME',    # Or path to database file if using sqlite3.
        'USER': 'FIXME',    # Not used with sqlite3.
        'PASSWORD': 'FIXMEFIXMEFIXME',   # Not used with sqlite3.
        'HOST': '',         # Empty for localhost. Not used with sqlite3.
        'PORT': '',         # Empty for default. Not used with sqlite3.
        'OPTIONS': {
            'init_command': "SET sql_mode='STRICT_TRANS_TABLES'",
        },
    }
}

# If you want to log to a local directory instead of the default
# /var/log/planb/ then enable this:
if False:

# Path: planb/default_settings.py
# LOGGING = {
#     'version': 1,
#     'disable_existing_loggers': True,
#     'filters': {
#         'require_debug_false': {
#             '()': 'django.utils.log.RequireDebugFalse',
#         },
#         'require_debug_true': {
#             '()': 'django.utils.log.RequireDebugTrue',
#         },
#     },
#     'formatters': {
#         'simple': {
#             'format': (
#                 '%(asctime)s [planb/%(process)5d] '
#                 '[%(levelname)-3.3s] %(message)s (%(name)s)'),
#         },
#         'notime': {
#             'format': '%(name)s - %(levelname)s/%(process)s - %(message)s',
#         },
#     },
#     'handlers': {
#         'null': {
#             'level': 'DEBUG',
#             'class': 'logging.NullHandler',
#         },
#         'mail_admins_err': {
#             'level': 'ERROR',
#             'filters': ['require_debug_false'],
#             'class': 'planb.common.log2.AdminEmailHandler'  # django.utils.log
#         },
#         'mail_admins_warn': {
#             'level': 'WARNING',
#             'filters': ['require_debug_false'],
#             'class': 'planb.common.log2.AdminEmailHandler'  # django.utils.log
#         },
#         'console': {
#             'level': 'DEBUG',
#             'class': 'logging.StreamHandler',
#             'formatter': 'simple',
#             'filters': ['require_debug_true'],
#         },
#         # 'gelf': {
#         #     'class': 'graypy.GELFHandler',
#         #     'host': '10.x.x.x',
#         #     'port': 12221,
#         # },
#         'logfile': {
#             'level': 'INFO',
#             'class': 'logging.handlers.WatchedFileHandler',
#             'formatter': 'simple',
#             'filename': '/var/log/planb/core.log',
#             # Delay, so management commands don't try to open these
#             # unless they have to.
#             'delay': True,
#         },
#         'djangoqlogfile': {
#             'level': 'DEBUG',
#             'class': 'logging.handlers.WatchedFileHandler',
#             'formatter': 'simple',
#             'filename': '/var/log/planb/queue.log',
#             # Delay, so management commands don't try to open these
#             # unless they have to.
#             'delay': True,
#         },
#     },
#     'loggers': {
#         'planb': {
#             'handlers': ['console', 'logfile', 'mail_admins_err'],
#             'level': 'DEBUG',
#             'propagate': False,
#         },
#         '': {
#             'handlers': ['mail_admins_warn'],
#             'level': 'WARNING',
#         },
#         # Let all other handlers below propagate on to here so we can send mail
#         # for all WARNINGs.
#         'django-q': {
#             'handlers': ['djangoqlogfile'],
#             'level': 'DEBUG',
#         },
#         'django': {
#             'handlers': ['console'],
#         },
#         'py.warnings': {
#             'handlers': ['console'],
#         },
#     }
# }


# Path: example_settings.py
from planb.default_settings import *  # noqa
from planb.default_settings import LOGGING  # fix flake warning

SERVER_EMAIL = 'planb@example.com'
EMAIL_SUBJECT_PREFIX = '[PlanB] '

COMPANY_NAME = 'Example Company'
COMPANY_EMAIL = 'support@example.com'

# MySQL config example:
#
# SQL> set names utf8;
# SQL> create database planb;
# SQL> grant all on planb.* to planb identified by 'FIXMEFIXMEFIXME';

DATABASES = {
    'default': {
        # Choose 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'FIXME',    # Or path to database file if using sqlite3.
        'USER': 'FIXME',    # Not used with sqlite3.
        'PASSWORD': 'FIXMEFIXMEFIXME',   # Not used with sqlite3.
        'HOST': '',         # Empty for localhost. Not used with sqlite3.
        'PORT': '',         # Empty for default. Not used with sqlite3.
        'OPTIONS': {
            'init_command': "SET sql_mode='STRICT_TRANS_TABLES'",
        },
    }
}

# If you want to log to a local directory instead of the default
# /var/log/planb/ then enable this:
if False:

    for key, handler in LOGGING['handlers'].items():