Doc building: Silence automated_steps

The logs of docs for this repo are really large, silence a small part: The
logging of automated steps debug output.

Change-Id: I3f7991a79bf89f04932bb4501c3f39d0317414e5
This commit is contained in:
Andreas Jaeger 2020-05-14 18:22:22 +02:00
parent a5d120c8c3
commit 1deefcbae8

View File

@ -30,6 +30,8 @@ from ironic.common import driver_factory
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
# Enable this locally if you need debugging output
DEBUG = False
def _list_table(add, headers, data, title='', columns=None): def _list_table(add, headers, data, title='', columns=None):
"""Build a list-table directive. """Build a list-table directive.
@ -85,8 +87,9 @@ def _init_steps_by_driver():
# the methods of the class. # the methods of the class.
for interface_name in sorted(driver_factory.driver_base.ALL_INTERFACES): for interface_name in sorted(driver_factory.driver_base.ALL_INTERFACES):
LOG.info('[{}] probing available plugins for interface {}'.format( if DEBUG:
__name__, interface_name)) LOG.info('[{}] probing available plugins for interface {}'.format(
__name__, interface_name))
loader = stevedore.ExtensionManager( loader = stevedore.ExtensionManager(
'ironic.hardware.interfaces.{}'.format(interface_name), 'ironic.hardware.interfaces.{}'.format(interface_name),
@ -110,8 +113,9 @@ def _init_steps_by_driver():
'interface': interface_name, 'interface': interface_name,
'doc': _format_doc(inspect.getdoc(method)), 'doc': _format_doc(inspect.getdoc(method)),
} }
LOG.info('[{}] interface {!r} driver {!r} STEP {}'.format( if DEBUG:
__name__, interface_name, plugin.name, step)) LOG.info('[{}] interface {!r} driver {!r} STEP {}'.format(
__name__, interface_name, plugin.name, step))
steps.append(step) steps.append(step)
if steps: if steps: