Skip to content

pull changes from SAP/cf-python-logging-support add support for Django and Falcon #27

Description

@bobbui

Activity

  1. danizen commented on Oct 11, 2019

    @danizen

    Is it better to do this in this module, or another that uses json_logging.register_framework_support.

    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 logging.dictConfig.

    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 LOGGING_CONFIG callable would do the required wiring:

    def configure_logging(logging_dict):
        logging.dictConfig(logging_dict)
        json_logging.ENABLE_JSON_LOGGING = True
        json_logging.init_django()
  2. bobbui commented on Oct 12, 2019

    @bobbui
    OwnerAuthor

    @danizen yeah, we can leverage the register_framework_support to add django support. PR is welcomed!

  3. danizen commented on Oct 21, 2019

    @danizen

    @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).

  4. bobbui commented on Oct 21, 2019

    @bobbui
    OwnerAuthor

    @danizen Sorry to hear that, hope you have a speedy recovery.
    sure that is something i can look into, i also plan to support custom list of headers to be logged together with correlation-id (e.g trace id, span id used by opentracing)

  5. kshpytsya commented on Jul 27, 2020

    @kshpytsya

    @thangbn , @danizen are there any plans on completing this any time soon, or should I rather try tackling this myself from scratch?

  6. bobbui commented on Jul 27, 2020

    @bobbui
    OwnerAuthor

    @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.

  7. obvionaoe commented on Nov 12, 2021

    @obvionaoe

    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...

  8. bobbui commented on Nov 12, 2021

    @bobbui
    OwnerAuthor

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions