mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 13:32:15 +00:00
Enable logging
This commit is contained in:
@@ -84,8 +84,43 @@ DATABASES = {
|
||||
}
|
||||
}
|
||||
|
||||
import dj_database_url
|
||||
DATABASES['default'] = dj_database_url.config()
|
||||
if not DEBUG:
|
||||
import dj_database_url
|
||||
DATABASES['default'] = dj_database_url.config()
|
||||
|
||||
# Logging
|
||||
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'
|
||||
}
|
||||
},
|
||||
'handlers': {
|
||||
'null': {
|
||||
'level': 'DEBUG',
|
||||
'class': 'logging.NullHandler',
|
||||
},
|
||||
'console': {
|
||||
'level': 'DEBUG',
|
||||
'class': 'logging.StreamHandler',
|
||||
'formatter': 'verbose'
|
||||
}
|
||||
},
|
||||
'loggers': {
|
||||
'RIGS': {
|
||||
'handlers': ['console'],
|
||||
'level': 'INFO',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# User system
|
||||
AUTH_USER_MODEL = 'RIGS.Profile'
|
||||
|
||||
Reference in New Issue
Block a user