Skip to content

Commit

Permalink
Try to log in a file
Browse files Browse the repository at this point in the history
This config used to work a few days (not on Heroku), now I cannot have traceback
for a known error 500 (described in #33)
  • Loading branch information
freezed committed Nov 4, 2018
1 parent 7de54d5 commit 915079c
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions omega/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
ALLOWED_HOSTS = ['ocp8-1664.herokuapp.com']

else:
DEBUG = True
DEBUG = False
SECRET_KEY = '3#-w$0tr9(e&o-_!^w9#8a9aw3-xzr0ncs-rfpap8ax)br^53^'
ALLOWED_HOSTS = [
'localhost',
Expand All @@ -36,33 +36,33 @@
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'verbose': {
'format': ('%(asctime)s [%(process)d] [%(levelname)s] ' +
'pathname=%(pathname)s lineno=%(lineno)s ' +
'funcname=%(funcName)s %(message)s'),
'datefmt': '%Y-%m-%d %H:%M:%S'
},
'simple': {
'format': '%(levelname)s %(message)s'
'filters': {
'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse'
}
},
'handlers': {
'null': {
'level': 'DEBUG',
'class': 'logging.NullHandler',
'mail_admins': {
'level': 'ERROR',
'filters': ['require_debug_false'],
'class': 'django.utils.log.AdminEmailHandler'
},
'logfile': {
'class': 'logging.handlers.WatchedFileHandler',
'filename': '/var/log/django/error.log'
},
'console': {
'level': 'DEBUG',
'class': 'logging.StreamHandler',
'formatter': 'verbose'
}
},
'loggers': {
'testlogger': {
'handlers': ['console'],
'level': 'INFO',
}
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',
'propagate': True,
},
'django': {
'handlers': ['logfile'],
'level': 'ERROR',
'propagate': False,
},
}
}

Expand Down

0 comments on commit 915079c

Please sign in to comment.