configure local logging

- add log formatters 'verbose' and 'simple' to gnuviechadmin.settings.base
- add loggers and handler in gnuviechadmin.settings.local
This commit is contained in:
Jan Dittberner 2015-02-01 14:59:36 +01:00
parent 81b9bc163b
commit 3f07ddb062
2 changed files with 41 additions and 0 deletions

View file

@ -306,6 +306,15 @@ CRISPY_TEMPLATE_PACK = 'bootstrap3'
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'verbose': {
'format': '%(levelname)s %(asctime)s %(name)s '
'%(module)s:%(lineno)d %(process)d %(thread)d %(message)s',
},
'simple': {
'format': '%(levelname)s %(name)s:%(lineno)d %(message)s',
},
},
'filters': {
'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse'

View file

@ -42,6 +42,38 @@ MIDDLEWARE_CLASSES += (
'debug_toolbar.middleware.DebugToolbarMiddleware',
)
LOGGING['handlers'].update({
'console': {
'level': 'DEBUG',
'class': 'logging.StreamHandler',
'formatter': 'simple',
}
})
LOGGING['loggers'].update({
'gnuviechadmin': {
'handlers': ['console'], 'level': 'DEBUG', 'propagate': True,},
'dashboard': {
'handlers': ['console'], 'level': 'DEBUG', 'propagate': True,},
'domains': {
'handlers': ['console'], 'level': 'DEBUG', 'propagate': True,},
'gvacommon': {
'handlers': ['console'], 'level': 'DEBUG', 'propagate': True,},
'gvawebcore': {
'handlers': ['console'], 'level': 'DEBUG', 'propagate': True,},
'hostingpackages': {
'handlers': ['console'], 'level': 'DEBUG', 'propagate': True,},
'managemails': {
'handlers': ['console'], 'level': 'DEBUG', 'propagate': True,},
'osusers': {
'handlers': ['console'], 'level': 'DEBUG', 'propagate': True,},
'taskresults': {
'handlers': ['console'], 'level': 'DEBUG', 'propagate': True,},
'userdbs': {
'handlers': ['console'], 'level': 'DEBUG', 'propagate': True,},
'websites': {
'handlers': ['console'], 'level': 'DEBUG', 'propagate': True,},
})
DEBUG_TOOLBAR_PATCH_SETTINGS = False
# http://django-debug-toolbar.readthedocs.org/en/latest/installation.html