-
-
Notifications
You must be signed in to change notification settings - Fork 60
pull changes from SAP/cf-python-logging-support add support for Django and Falcon #27
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Is it better to do this in this module, or another that uses Whether in this package or another, the way to make it easy for a Django developer is to use a Django middleware and the LOGGING_CONFIG setting which can pre-process the dictionary usually passed to This would look like this in a Django settings file: MIDDLEWARE = [
'logging_config.framework.django.RequestResponseMiddleware',
# ... rest of middleware
]
LOGGING_CONFIG='json_logging.framework.django.config_logging' And then the def configure_logging(logging_dict):
logging.dictConfig(logging_dict)
json_logging.ENABLE_JSON_LOGGING = True
json_logging.init_django() |
@danizen yeah, we can leverage the register_framework_support to add django support. PR is welcomed! |
@thangbn, I have a broken wrist right now. I code slow until healed. But wait a month or so. I've also been wondering about the correlation id, and auto headers added in the cloud. If you are running behind an AWS ALB, it will send X-Amzn-Trace-Id. But this has an internal structure. I'm not sure whether this module makes a requirement on the structure of the Correlation ID header (e.g. UUID or something). |
@danizen Sorry to hear that, hope you have a speedy recovery. |
@kshpytsya i really dont have time to to this, you are very welcome to create a PR, it should relatively straight forward to do. Thanks in advance. |
Hi, is this still being worked on? I'd love to contribute as I really need Django support but I'm kind of a python beginner, so I don't even have a clue where to start... |
Feel free to submit it, we can all improve it together. no worries |
https://github.com/SAP/cf-python-logging-support have a quite similar setup in term of adding framework support. We can pull Django and Falcon support from https://github.com/SAP/cf-python-logging-support/tree/master/sap/cf_logging/django_logging and https://github.com/SAP/cf-python-logging-support/tree/master/sap/cf_logging/falcon_logging to json_logging
The text was updated successfully, but these errors were encountered: