Bug 1577369 - DEBUG-level logging does not log request POST body
Summary: DEBUG-level logging does not log request POST body
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.5
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: candlepin-bugs
QA Contact: Red Hat subscription-manager QE Team
Depends On:
TreeView+ depends on / blocked
Reported: 2018-05-11 19:49 UTC by Chris Duryee
Modified: 2021-02-08 15:31 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2021-02-08 15:31:24 UTC
Target Upstream Version:

Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.