Issue #1414
closedpulp rpm profiler INFO-level logging is very verbose
Description
(I am not sure if an issue already exists for this, there may be one but my search didn't find it)
As part of testing a patch related to errata applicability, we noticed there were lots of INFO-level messages from the yum profiler. For example, there were 1700 messages when applying a large set of errata:
# # the "grep -v 2015" is from laziness, to strip out some extra stuff I don't want
# less /var/log/messages | grep pulp | awk -F: '{print $4}' | grep -v 2015 | sort | uniq -c | sort -n | tail -n3
329 celery.worker.job
329 celery.worker.strategy
1757 pulp.plugins.pulp_rpm.plugins.profilers.yum
The messages themselves are of the following form:
Dec 14 20:43:59 some-hostname pulp: pulp.plugins.pulp_rpm.plugins.profilers.yum:INFO: Rpms: <[{u'sr
c': u'libxml2-2.9.1-6.el7_2.2.src.rpm', u'name': u'libxml2-python', u'sum': [u'sha256', u'f41066dada
5735efd68203f77a3f9defbc35db23b1ccc4692f3abde268189edb'], u'filename': u'libxml2-python-2.9.1-6.el7_
2.2.x86_64.rpm', u'epoch': u'0', u'version': u'2.9.1', u'release': u'6.el7_2.2', u'arch': u'x86_64'}
, {u'src': u'libxml2-2.9.1-6.el7_2.2.src.rpm', u'name': u'libxml2', u'sum': [u'sha256', u'f9e3f597e6
6c24408e405c42d20985daf0b457aeb8129b4cc664724a5bbf6bc1'], u'filename': u'libxml2-2.9.1-6.el7_2.2.x86
_64.rpm', u'epoch': u'0', u'version': u'2.9.1', u'release': u'6.el7_2.2', u'arch': u'x86_64'}]> were
found to be related to errata <Unit [key={u'id': u'RHSA-2015:2550'}] [type=erratum] [id=fde1a692-ce
93-4e5f-aa9e-5a726c6a1b93]> and applicable to consumer <3e5bd964-26ea-4ede-bbaa-11f8e9e93084>
Can the log message be replaced with a smaller message, and/or have fewer messages printed? The messages themselves are helpful since the calculation can take some time and it's nice to know that Pulp is working on it, but the verbosity of the log makes it hard to see what it's doing exactly. A message somewhere in https://github.com/pulp/pulp_rpm/blob/master/plugins/pulp_rpm/plugins/profilers/yum.py#L94-L104 may be useful saying "expanded erratum to N rpms" but better solutions are welcome:)
Adjust profiler logging. closes #1414