Django 2.2.13
Debian Linux
I'm trying to configure a DatagramHandler for logging. My LOGGING config is:
LOGGING = {'version': 1,'disable_existing_loggers': False,'handlers': {'file': {'level': 'DEBUG','class': 'logging.FileHandler','filename': os.path.join(LOG_DIR, 'django.log'),},'netcat': {'level': 'DEBUG','class': 'logging.handlers.DatagramHandler','host': 'xxxxx','port': 23001,},},'loggers': {'django': {'handlers': ['file'],'level': 'DEBUG','propagate': True,},},}
When django starts, I get:
AttributeError: module 'logging' has no attribute 'DatagramHandler'
Sure enough, if I look in.../lib/python3.7/logging/__init__.py, there is no DatagramHandler. So what am I supposed to do?
I suspect this is more of a Python question than a Django question, but I figured I'd start here and work my way up :-)
No comments:
Post a Comment