Bug 1577369

Summary: DEBUG-level logging does not log request POST body
Product: Red Hat Enterprise Linux 7 Reporter: Chris Duryee <cduryee>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: low Docs Contact:
Priority: medium    
Version: 7.5CC: khowell, redakkan
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-08 15:31:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Chris Duryee 2018-05-11 19:49:08 UTC
Description of problem:

It is sometimes useful to see what data sub-man is POSTing up to candlepin. However, if you enable debug-level logging in /etc/rhsm/rhsm.conf, you'll just see two lines related to the POST. For example:

2018-05-11 19:30:08,303 [DEBUG] subscription-manager:16862:MainThread @connection.py:543 - Making request: POST /subscription/consumers?owner=5894300                                                                                                                                    
2018-05-11 19:30:10,515 [INFO] subscription-manager:16862:MainThread @connection.py:586 - Response: status=200, requestUuid=d79b1f15-c84a-4d19-b58c-16b79137f268, request="POST /subscription/consumers?owner=5894300"      

It would be more useful if the request body was logged as well. This makes it easier to replicate the call when working on issues.

Version-Release number of selected component (if applicable): 1.20


How reproducible: every time


Steps to Reproduce:
1. set the following in rhsm.conf:
[logging]
default_log_level = DEBUG
rhsm.connection = DEBUG

2. do a register
3. view rhsm.log

Actual results: you'll see the URLs called, but POSTs do not show the request body.


Expected results: the request body should be logged at debug level

Comment 3 Rehana 2021-02-08 15:31:24 UTC
thanks for opening the bug , we have improved the debugging experience over the last couple of years . can be find here https://www.candlepinproject.org/docs/subscription-manager/debug_http_traffic.html . 

Thanks,
Rehana