Django and LogDNA, server seems to be getting stuck
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 27
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Description
Hey LogDNA,
It could be my configuration but when trying to use LogDNA and Django, the server seems to get stuck. Here's some cursory information:
```python
import logging
from logdna import LogDNAHandler
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'verbose': {
'format': "[%(asctime)s] %(levelname)s [%(name)s:%(lineno)s]" +
"%(message)s",
'datefmt': "%d/%b/%Y %H:%M:%S"
},
'color': {
'()': 'colorlog.ColoredFormatter',
'format': '%(log_color)s%(asctime)s %(levelname)-8s %(name)s %(module)s %(pathname)s:%(lineno)s%(reset)s \n\r\t %(message)s',
'datefmt': "%d/%b/%Y %H:%M:%S",
'log_colors': {
'DEBUG': 'cyan',
'INFO': 'green',
'WARNING': 'yellow',
'ERROR': 'red',
'CRITICAL': 'red,bg_white',
}
}
},
'filters': {
'require_debug_true': {
'()': 'django.utils.log.RequireDebugTrue',
},
},
'handlers': {
'console': {
'level': 'DEBUG',
'filters': ['require_debug_true'],
'class': 'logging.StreamHandler',
'formatter': 'color'
},
'logdna': {
'level': logging.DEBUG,
'class': 'logdna.LogDNAHandler',
'key': "my_secret_key",
'options': {
# 'app': '',
# 'env': "alpha",
'index_meta': True,
},
},
},
'loggers': {
'': {
'level': logging.DEBUG,
'handlers': ['logdna'],
'propagate': True,
},
}
}
```
I am using the above example for Django logging using LogDNA. But when I'm running a Django server, it's getting stuck. For reference I'm using this as a [guide](https://github.com/logdna/python).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported hang with the Django LOGGING configuration in the issue and compare it with the linked LogDNA Python guide. Identify whether the LogDNAHandler configuration causes the server to stop responding, then document a confirmed cause and a verifiable resolution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- django, python
- Domain
- backend, observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100