-
-
Save MilosSimic/91e318284901229791d32070b8347068 to your computer and use it in GitHub Desktop.
Default configuration to use ELK stack with django project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOGGING = { | |
'handlers': { | |
'logstash': { | |
'level': 'DEBUG', | |
'class': 'logstash.LogstashHandler', | |
'host': 'localhost', | |
'port': 5000, # Default port of logstash | |
'version': 1, # Version of logstash event schema. Default value: 0 (for backward compatibility of the library) | |
'message_type': 'logstash', # 'type' field in logstash message. Default value: 'logstash'. | |
'fqdn': False, # Fully qualified domain name. Default value: false. | |
'tags': ['tag1', 'tag2'], # list of tags. Default: None. | |
}, | |
}, | |
'loggers': { | |
'django.request': { | |
'handlers': ['logstash'], | |
'level': 'DEBUG', | |
}, | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment