@ -186,7 +186,42 @@ try:
except:
SECRET_KEY = '12345zmr_k53a*@f4q_+ji^o@!pgpef*5&8c7zzdqwkdlkj'
# Logging
LOGGING = {
'version': 1,
'disable_existing_loggers': True,
'formatters': {
'verbose': {
'format': '%(levelname)s %(asctime)s %(module)s: %(message)s'
},
'loggers': {
# Catch-all logger
'': {
'handlers': ['console'], # Add 'mail_admins' in prod (and test?)
'level': 'DEBUG',
'handlers': {
'console': {
'level': 'INFO', ## Set to 'DEBUG' in local (and test?)
'class': 'logging.StreamHandler',
'formatter': 'verbose',
'mail_admins': {
'level': 'ERROR',
'class': 'django.utils.log.AdminEmailHandler',
}
# MaM specific
@ -36,3 +36,6 @@ DATABASES = {
# LOGGING
LOGGING['handlers']['console']['level'] = 'DEBUG'
@ -60,20 +60,8 @@ CSRF_COOKIE_SECURE = True
# LOGGING = {
# 'version': 1,
# 'disable_existing_loggers': True,
# 'handlers': {
# 'console': {
# 'class': 'logging.StreamHandler',
# },
# 'loggers': {
# 'django': {
# 'handlers': ['console'],
# 'level': os.getenv('DJANGO_LOG_LEVEL', 'INFO'),
# }
LOGGING['loggers']['']['handlers'].extend('mail_admins')
@ -50,7 +50,6 @@ import os
SERVER_EMAIL = 'mamweb-test-errors@mam.mff.cuni.cz'
ADMINS = [
('Petr Pecha', 'nejlepsitextovyeditorjevim@gmail.com'),
('Tomas Gavenciak', 'gavento@gmail.com'),
]
@ -59,5 +58,8 @@ ADMINS = [
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True