Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1266935

Summary: Reduce default log level to INFO (from DEBUG)
Product: Red Hat Enterprise Linux 7 Reporter: Adrian Likins <alikins>
Component: subscription-managerAssignee: Alex Wood <awood>
Status: CLOSED CURRENTRELEASE QA Contact: John Sefler <jsefler>
Severity: low Docs Contact:
Priority: low    
Version: 7.2CC: awood, bcourt, khowell
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: subscription-manager-1.18.2-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-25 14:55:04 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:
Bug Depends On: 1267000    
Bug Blocks:    

Description Adrian Likins 2015-09-28 15:10:57 UTC
Description of problem:

Subscription-manager enables debug level logging by default.
And that is a lot of logging.

It should only use INFO by default.

Actual results:
Lots of DEBUG level log entries in /var/log/rhsm/rhsm.log

Expected results:
Only INFO level or higher messages in /var/log/rhsm/rhsm.log


Additional info:

Comment 1 John Sefler 2015-09-30 16:53:33 UTC
deferring to rhel-7.3.0 due to schedule and severity

Comment 4 John Sefler 2016-05-04 18:07:04 UTC
The log level for /var/log/rhsm/rhsm.log can be set in the [handler_rhsm_log] section of ini file /etc/rhsm/logging.conf 


Verifying Version...
[root@jsefler-rhel7 ~]# rpm -q subscription-manager
subscription-manager-1.17.5-1.el7.x86_64

[root@jsefler-rhel7 ~]# cat /etc/rhsm/logging.conf
[loggers]
keys=root,rhsm-app,rhsm,subscription_manager,py.warnings

[handlers]
keys=rhsm_log,subman_debug

[formatters]
keys=rhsm_log,subman_debug



[logger_root]
level=NOTSET
handlers=subman_debug

[logger_rhsm-app]
level=DEBUG
handlers=rhsm_log
qualname=rhsm-app

[logger_rhsm]
level=DEBUG
handlers=rhsm_log
qualname=rhsm

[logger_subscription_manager]
level=DEBUG
handlers=rhsm_log
qualname=subscription_manager

[logger_py.warnings]
level=WARNING
handlers=rhsm_log
qualname=py.warnings



[formatter_syslog]
format=[%(levelname)s] @%(filename)s:%(lineno)d - %(message)s
datefmt=
class=logging.Formatter

[formatter_rhsm_log]
format=%(asctime)s [%(levelname)s] %(cmd_name)s:%(process)d @%(filename)s:%(lineno)d - %(message)s
datefmt=
class=logging.Formatter

[formatter_subman_debug]
format=%(asctime)s [%(name)s %(levelname)s] %(cmd_name)s(%(process)d):%(threadName)s @%(filename)s:%(funcName)s:%(lineno)d - %(message)s
datefmt=
class=logging.Formatter



[handler_syslog]
class=handlers.SysLogHandler
level=INFO
formatter=syslog
args=(('/dev/log',))

[handler_rhsm_log]
class=subscription_manager.logutil.RHSMLogHandler
level=INFO
formatter=rhsm_log
# logfilepath is '/var/log/rhsm/rhsm.log' by default
# To change it, replace '%(logfilepath)s' with the path to the desired log file.
# For example, args=('/var/log/rhsm/mylogfile.log',)
args=('%(logfilepath)s',)

[handler_subman_debug]
class=subscription_manager.logutil.SubmanDebugHandler
level=DEBUG
formatter=subman_debug
args=()


VERIFIED: The level in [handler_rhsm_log] is now INFO.  In prior versions of subscription-manager, it was DEBUG.