Add SysLog handler
This commit is contained in:
parent
87c477d0c4
commit
ab3029bd75
|
|
@ -14,7 +14,7 @@ import sys
|
|||
|
||||
import dj_database_url
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from dotenv import load_dotenv, find_dotenv
|
||||
from dotenv import find_dotenv, load_dotenv
|
||||
|
||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||
from core.env_utils import bool_value
|
||||
|
|
@ -305,6 +305,13 @@ LOGGING = {
|
|||
'stream': sys.stdout,
|
||||
'formatter': 'simple_format'
|
||||
},
|
||||
# for automatic papertrail logging
|
||||
'SysLog': {
|
||||
'level': 'INFO',
|
||||
'class': 'logging.handlers.SysLogHandler',
|
||||
'formatter': 'simple_format',
|
||||
|
||||
},
|
||||
},
|
||||
'loggers': {
|
||||
'': {
|
||||
|
|
@ -312,7 +319,7 @@ LOGGING = {
|
|||
'level': 'WARNING'
|
||||
},
|
||||
'skillbox': {
|
||||
'handlers': ['console'],
|
||||
'handlers': ['console', 'SysLog'],
|
||||
'level': 'DEBUG',
|
||||
'propagate': False
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue