This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1266935 - Reduce default log level to INFO (from DEBUG)
Reduce default log level to INFO (from DEBUG)
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager (Show other bugs)
7.2
Unspecified Unspecified
low Severity low
: rc
: ---
Assigned To: Alex Wood
John Sefler
: Triaged
Depends On: 1267000
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-28 11:10 EDT by Adrian Likins
Modified: 2017-04-25 10:55 EDT (History)
3 users (show)

See Also:
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 10:55:04 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Adrian Likins 2015-09-28 11:10:57 EDT
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 12:53:33 EDT
deferring to rhel-7.3.0 due to schedule and severity
Comment 4 John Sefler 2016-05-04 14:07:04 EDT
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.