Deploy fixes: supervisor script execution, local settings for logging with raven and logging disabled on main settings
This commit is contained in:
parent
1bb173312f
commit
df77cac478
|
@ -1,5 +1,5 @@
|
|||
[program:gunicorn]
|
||||
command = /home/app/virtualenv/bin/python /home/app/app/manage.py run_gunicorn -w 4 -k gevent
|
||||
command = /home/app/virtualenv/bin/python2 /home/app/app/manage.py run_gunicorn --settings=herobrine.local_settings -w 2
|
||||
directory = /home/app/app
|
||||
user = app
|
||||
autostart = true
|
||||
|
|
|
@ -40,3 +40,46 @@ INSTALLED_APPS = INSTALLED_APPS + (
|
|||
'raven.contrib.django.raven_compat',
|
||||
'gunicorn'
|
||||
)
|
||||
|
||||
# Logging
|
||||
LOGGING = {
|
||||
'version': 1,
|
||||
'disable_existing_loggers': True,
|
||||
'root': {
|
||||
'level': 'WARNING',
|
||||
'handlers': ['sentry'],
|
||||
},
|
||||
'formatters': {
|
||||
'verbose': {
|
||||
'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
|
||||
},
|
||||
},
|
||||
'handlers': {
|
||||
'sentry': {
|
||||
'level': 'ERROR',
|
||||
'class': 'raven.contrib.django.raven_compat.handlers.SentryHandler',
|
||||
},
|
||||
'console': {
|
||||
'level': 'DEBUG',
|
||||
'class': 'logging.StreamHandler',
|
||||
'formatter': 'verbose'
|
||||
}
|
||||
},
|
||||
'loggers': {
|
||||
'django.db.backends': {
|
||||
'level': 'ERROR',
|
||||
'handlers': ['console'],
|
||||
'propagate': False,
|
||||
},
|
||||
'raven': {
|
||||
'level': 'DEBUG',
|
||||
'handlers': ['console'],
|
||||
'propagate': False,
|
||||
},
|
||||
'sentry.errors': {
|
||||
'level': 'DEBUG',
|
||||
'handlers': ['console'],
|
||||
'propagate': False,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -143,20 +143,6 @@ JINJA_CONFIG = {
|
|||
}
|
||||
#from herobrine import filters
|
||||
|
||||
# A sample logging configuration. The only tangible logging
|
||||
# performed by this configuration is to send an email to
|
||||
# the site admins on every HTTP 500 error when DEBUG=False.
|
||||
# See http://docs.djangoproject.com/en/dev/topics/logging for
|
||||
# more details on how to customize your logging configuration.
|
||||
LOGGING = {
|
||||
'version': 1,
|
||||
'disable_existing_loggers': False,
|
||||
'filters': {
|
||||
'require_debug_false': {
|
||||
'()': 'django.utils.log.RequireDebugFalse'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try:
|
||||
LOCAL_SETTINGS
|
||||
|
|
Loading…
Reference in New Issue