Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

Enhance debug functionality #2

Closed
f5-rahm opened this issue Sep 15, 2020 · 1 comment
Closed

Enhance debug functionality #2

f5-rahm opened this issue Sep 15, 2020 · 1 comment

Comments

@f5-rahm
Copy link

f5-rahm commented Sep 15, 2020

Add ability to see curl format of every request sent as a list item in a debug attribute, whether or not there is an error.

Requires no change to the debug='file' submission, but will take that and:

  • Set debug attribute to True
  • Set debug_file attribute to the filename
  • Append all requests as curl formatted commands to debug_output list attribute
  • Still allow for debug file to be created on errors
f5-rahm referenced this issue in f5-rahm/BIGREST Sep 15, 2020
- fixed RESTAPIError so it triggers even when debug is False
- Added BIG-IQ, I overlooked those changes
- Updated debug file references
@leonardobdes
Copy link
Owner

I looked at your implementaiton but there are 2 problems with this approach.
If we save every HTTP request in a curl format, we will use a lot of memory if the script is changing many objects or sending large files.
I tried to implement an option that would allow the user to get the curl command for the last HTTP request, but the problem is that the SDK does a lot of requests in the same method, so users would only see the last request for that method.
I end up adding the curl command to the output of the debug option, together with the information that already existed, and moved the debug functions to a separated file.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants