IBM / python-sdk-core

The python-sdk-core repository contains core functionality required by Python code generated by the IBM OpenAPI SDK Generator.
Apache License 2.0
20 stars 27 forks source link

fix(logging): improve python core's debug logging #208

Closed padamstx closed 1 month ago

pyrooka commented 2 months ago

As I'm looking at the changes and the README. Shouldn't we update the logging section of the README? Especially the code below. Now it's enough to enable the debug logging before the base service is created, right?

### Low level request and response dump
To get low level information of the requests/ responses:

from http.client import HTTPConnection
HTTPConnection.debuglevel = 1
padamstx commented 1 month ago

As I'm looking at the changes and the README. Shouldn't we update the logging section of the README? Especially the code below. Now it's enough to enable the debug logging before the base service is created, right?

### Low level request and response dump
To get low level information of the requests/ responses:

from http.client import HTTPConnection
HTTPConnection.debuglevel = 1

Yes, I'm planning on doing that prior to merging.

padamstx commented 1 month ago

@dpopp07 @pyrooka I think I can say that this PR is finally finished! :joy: In my more recent changes, I've simplified a bit how testcases can enable debug logging, and I also updated the README.md to have more up-to-date info about logging.

Edit: I re-requested reviews mainly due to the changes in README.md. You should be able to easily see the recent changes by clicking on the appropriate "Compare" link above.

dpopp07 commented 1 month ago

Looks pretty similar so maybe it's good to go already but does this have any implications for how the SDKs do logging, as documented here?

padamstx commented 1 month ago

Looks pretty similar so maybe it's good to go already but does this have any implications for how the SDKs do logging, as documented here?

Yes, I have a to-do item to go through the logging-related info in the common sdk repo and make adjustments as needed after all the logging-related changes in the cores.

ibm-devx-sdk commented 1 month ago

:tada: This PR is included in version 3.21.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: