mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-02-05 14:48:22 +00:00
Enable logging
This commit is contained in:
@@ -84,8 +84,43 @@ DATABASES = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
import dj_database_url
|
if not DEBUG:
|
||||||
DATABASES['default'] = dj_database_url.config()
|
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
|
# User system
|
||||||
AUTH_USER_MODEL = 'RIGS.Profile'
|
AUTH_USER_MODEL = 'RIGS.Profile'
|
||||||
|
|||||||
Reference in New Issue
Block a user