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 - Reduce default log level to INFO (from DEBUG)
Summary: Reduce default log level to INFO (from DEBUG)
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.2
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Alex Wood
QA Contact: John Sefler
URL:
Whiteboard:
Depends On: 1267000
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-28 15:10 UTC by Adrian Likins
Modified: 2017-04-25 14:55 UTC (History)
3 users (show)

Fixed In Version: subscription-manager-1.18.2-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-04-25 14:55:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1267000 0 low CLOSED Verify log statements are the correct level and fix any that aren't. 2021-02-22 00:41:40 UTC

Internal Links: 1267000

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.


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