analytics-python icon indicating copy to clipboard operation
analytics-python copied to clipboard

Would it possible to also log response if it is 200 and in debug mode?

Open kim5566 opened this issue 1 year ago • 2 comments

We are utilizing the Segment Python client to transmit analytics events to our host.

We have implemented a custom validation message for successful responses.

Additionally, we would like to enable logging of these messages in DEBUG mode. Is it possible to modify this https://github.com/segmentio/analytics-python/blob/75838879c5b2859f6305bea0970c424198ee278a/segment/analytics/request.py#L61 so that it also logs res.json()?

Happy to make code change if accepted

Thank you in advance!

kim5566 avatar Sep 06 '24 06:09 kim5566

@kim5566

Please feel free to submit a change request for this.

Thank you!

nd4p90x avatar Sep 25 '24 14:09 nd4p90x

Thanks for your response! @nd4p90x i have raised the PR here: https://github.com/segmentio/analytics-python/pull/491

kim5566 avatar Oct 11 '24 00:10 kim5566